Jürg Billeter wrote:
ThanksOn Tue, 2008-06-17 at 19:59 +0100, Sam Liddicott wrote:I've grep'd all my vapi files and can't find any timer classes that provide callbacks, can anyone help? I've seen the example at: http://live.gnome.org/Vala/Tutorial but O'm just running Gtk.main, not making a loop, so I don't have anything to time.attach to.Gtk.main uses a mainloop, so you can use something as follows: Timeout.add (interval, callback); I've also modified the vala glade demo to make connect_signals more reasonable: if (!module.symbol ("glade_phone_ui_" + handler_name, out sym) && !module.symbol (handler_name, out sym)) { Of course "glade_phone_ui" is my namespace hierachy, but is there a magical preprocessor token to pull out the current namespace hierachy prefix to save me hard wiring it? That would be a reasonable change to the glade example.No, that's not possible at the moment. It would be nice if we find a convenient solution for this - I'd focus on GtkBuilder instead of Glade, though. Ah. Does it read glad files or have a gui designer? Sam |