[Vala] Connecting widgets delphi style
- From: Sam Liddicott <sam liddicott com>
- To: vala-list gnome org
- Subject: [Vala] Connecting widgets delphi style
- Date: Tue, 17 Jun 2008 21:24:29 +0100
This connects widgets if they are declared as public static, which of
course is no good really;
...
public static Gtk.Entry dialer_entry;
...
private void widget_connect() {
weak List<Gtk.Widget> widgets = this.xml.get_widget_prefix("");
Gtk.Widget ** sym;
foreach (Gtk.Widget widget in widgets) {
if (!module.symbol (namespace + widget.name, out sym) &&
!module.symbol (widget.name, out sym)) {
stdout.printf ("Symbol not found: %s\n", namespace +
widget.name);
} else {
stdout.printf("Connect Widget %s %p %p\n",widget.name,
sym, *sym);
*sym=widget;
}
}
}
So I need to do object introspection to find the address of a named
member of an instance.
Is this working in vala yet?
Sam
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]