[Vala] timers with callbacks



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.



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.


Finally, (cos I'm an old Delphi nut) I want to extend the connect_signals stuff to connect more than signals, but also widget names, so I'll be pulling back all widget names, and then looking for exported symbols in a similar manner; however I guess I should be doing some RTTI stuff to make sure the symbol I'm about to populate is of the right types. Any clues?? I'll do it typeless for now.


I'm annoyed that this C syntax isn't supported:
       if (this.module = Module.open (null, ModuleFlags.BIND_LAZY)) {

However this doesn't work either:
if ((this.module = Module.open (null, ModuleFlags.BIND_LAZY))!=NULL) {

I've not managed to find the equivalent for NULL checking yet. (This was to save re-opening module for every attached signal).

Sam



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]