Maybe just this once . . .must sleep first.
Will be gardening today
Good news from gege2061
Looking forward to your efforts Mark
Code: Select all
** (valide:5873): DEBUG: Couldn't open this document
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0xb7d14bd4 in gtk_tree_model_get_iter () from /usr/lib/libgtk-x11-2.0.so.0
Program received signal SIGSEGV, Segmentation fault.
Code: Select all
(gdb) backtrace
#0 0xb7d14bd4 in gtk_tree_model_get_iter () from /usr/lib/libgtk-x11-2.0.so.0
#1 0xb7d14c39 in gtk_tree_row_reference_new_proxy ()
from /usr/lib/libgtk-x11-2.0.so.0
#2 0xb7d14db4 in gtk_tree_row_reference_new ()
from /usr/lib/libgtk-x11-2.0.so.0
#3 0xb7c01e62 in gtk_combo_box_set_active_internal ()
from /usr/lib/libgtk-x11-2.0.so.0
#4 0xb7c02286 in gtk_combo_box_set_active () from /usr/lib/libgtk-x11-2.0.so.0
#5 0xb7806da9 in IA__g_object_set_property (object=0x82e0020,
property_name=0x82db890 "active", value=0x82ded14) at gobject.c:938
#6 0xb7d4dd00 in gtk_widget_buildable_set_buildable_property ()
from /usr/lib/libgtk-x11-2.0.so.0
#7 0xb7be17a5 in _gtk_builder_construct () from /usr/lib/libgtk-x11-2.0.so.0
#8 0xb7be208b in builder_construct () from /usr/lib/libgtk-x11-2.0.so.0
#9 0xb7be34be in start_element () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb7ecb075 in g_markup_parse_context_parse ()
from /usr/lib/libglib-2.0.so.0
#11 0xb7be1efb in _gtk_builder_parser_parse_buffer ()
from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7be067c in gtk_builder_add_from_string ()
from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb7fadb73 in ?? () from /usr/lib/libvalide-0.0.so
#14 0x082819b8 in ?? ()
---Type <return> to continue, or q <return> to quit---
#15 0xb7fc9e44 in ?? () from /usr/lib/libvalide-0.0.so
#16 0x00003341 in ?? ()
#17 0xbf8e8ac0 in ?? ()
#18 0x00000000 in ?? ()
Code: Select all
<property name="active">0</property>
Code: Select all
get_combobox(get_widget("combobox1")).set_active(0)
Yes. The main problem has been lack of beginner's documentation. There is documentation out there, but very terse, really written for people who already know how to code in Vala/Genie.Lobster wrote:Barry is Genie living up to your expectations so far?
Yes, most developers are quick to impress with complexBarryK
Yes. The main problem has been lack of beginner's documentation. There is documentation out there, but very terse, really written for people who already know how to code in Vala/Genie.
For sometime I have just been blundering along, but yesterday when I wrote a program in Genie to replace a slow Bash script, I suddenly realised that I had crossed a threshold and was happily coding in Genie.
Genie really is inherently easy to code in
Code: Select all
// Infinite Monkey Theorem
// Lobster and Shadow, March 2009 LGPL
// use from command line
// imt ["search text"]
// generates random characters and searches for a given pattern eg 'in the beginning was the world'
// warning strings longer than "in the" may take minutes or hours to find
// program demonstrates:
// basic functions
// passing parameters in command line
// random character generation
// constant
def getRandomNumber(RangeFrom:int, RangeTo:int) : int /* function to create random number between range */
return GLib.Random.int_range(RangeFrom,RangeTo)
def getRandomChar() : char /* function to generate ascii codes from a-z and space (32) */
num:int = getRandomNumber(0,27)
if num == 0
num = 32
else num = num + 96
return (char) num
def addRandomChar(myText:string) : string /* function add text from command line */
var retText = new StringBuilder
retText.append(myText)
retText.append_c(getRandomChar())
return retText.str
init
USAGE:string = "Usage:\n\t ./imt \"some text for monkeys to generate\" "
theText:string = args[1]
if theText == null
theText = ""
theText = theText.down() /* change any text input to lower case */
myText:string = ""
if theText != ""
do
do
myText = addRandomChar(myText)
while theText.len() != myText.len()
print(myText)
if theText != myText
stdout.printf("\n")
myText = ""
while theText != myText
stdout.printf("\n")
else print(USAGE) /* this appears if program run without text */
ah ha!! now there is a name for what I've been trying to do for the last couple days tying to build a new isoThe infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare
Code: Select all
def startTimer() : int /* function to create timer */
return GLib.Time.local()
init
print startTimer()
Code: Select all
[indent=2]
def getTime() : string
return GLib.Time.local(time_t ()).to_string()
init
//-- display the current time --
print ("%s" , getTime())
//-- run a timer to check how long a code needs --
timer : Timer = new Timer()
timer.start()
for var n = 0 to 10000
print ("%d" , n)
timer.stop()
print ("%f seconds were needed." , timer.elapsed() )
never heard of that . . .And now eat some fish *mjam
Code: Select all
# valac timer.gs
# ./timer
Segmentation fault
Code: Select all
(gdb) run
Starting program: /root/zz_imt3/timer
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
0xb7e6c6f2 in strcmp () from /lib/libc.so.6
(gdb) quit