Hi Klaus, Thanks for your interest in GTK-server!On my Ubuntu 64bit this example works fine with 'gtk_main_iteration' - so can you tell me which version of Linux you are using, which GNU awk?
Anyway, the 'gtk_main_iteration' normally is not used in a mainloop - just forget about it. As you can see in chapter 11, the 'gtk_server_callback' takes over this event handling:
"The mainloop has changed, now the 'gtk_server_callback' function has the argument 'WAIT', which will take over the previous 'gtk_main_iteration'. So the callback function will wait, until an event has occured. It returns to the AWK program with the widget ID which emitted the signal."
Best regards Peter Quoting Klaus Grue <grue@xxxxxxx>:
Hi, When I follow http://www.gtk-server.org/GTK-server_Tutorial.html I get a segfault when I reach Chapter 7. GTK programming - the mainloop. and perform this: print "gtk_main_iteration" |& GTK; GTK |& getline When I instead follow http://www.gtk-server.org/GTK-server_Manual.html and do not call "gtk_main_iteration" at all, everything works fine. Is GTK-server_Tutorial.html outdated w.r.t. "gtk_main_iteration"? Cheers, Klaus PS Thanks for this great gtk-server.
-- http://www.gtk-server.org