Re: [Vala] C# developer, newbie question

2018-12-19 Thread Wolfgang Mauer
Thanks, but same result, does it work that way at all? GLib-GObject-CRITICAL **: 23:22:53.584: g_enum_get_value_by_name: assertion 'G_IS_ENUM_CLASS (enum_class)' failed EnumClass enumc = (EnumClass)typeof(Gdk.WindowState).class_ref (); var state = (Gdk.WindowState)enumc.get_value_by_name("FOCU

Re: [Vala] C# developer, newbie question

2018-12-19 Thread Andy Lees via vala-list
I believe it's because the string produced in your first assignment to strState is the C transformed enum value which concatenates the type and value with an "_". It does this to map the nested name space of Vala enums into the flat C name space. You would need to remove the type + "_" from the r

Re: [Vala] C# developer, newbie question

2018-12-19 Thread Wolfgang Mauer
Hi all, i try to put a enum to string and back, with no success. var strState = get_window().get_state().to_string(); <-- "GDK_WINDOW_STATE_FOCUSED" and back dont work EnumClass enumc = (EnumClass)typeof(Gdk.WindowState).class_ref (); var state = (Gdk.WindowState)enumc.get_value_by_name(strSt

Re: [Vala] C# developer, newbie question

2018-12-19 Thread Wolfgang Mauer
Hi all, i try to put a enum to string and back, with no success. var strState = get_window().get_state().to_string(); <-- "GDK_WINDOW_STATE_FOCUSED" and back dont work EnumClass enumc = (EnumClass)typeof(Gdk.WindowState).class_ref (); var state = (Gdk.WindowState)enumc.get_value_by_name(strSt

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Wolfgang Mauer
>OK, to instantiate it I think it needs to be a GtkChild. What error are you getting with GtkChild? Yes, i also think GtkChild is correct, i just remember that i have a similar problem with gtk-sharp. Found the problem, I'm kidding, forgot to include the namespace Everything works fine, tha

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Al Thomas via vala-list
> On Tuesday, 18 December 2018, 14:44:30 GMT, Wolfgang Mauer wrote: > So i have to make the "new StatusList" !? Not sure if it's the only way, but the following project uses in the UI filethen instantiates the widget in the constructor of the main window and adds it to that window. These

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Al Thomas via vala-list
> On Tuesday, 18 December 2018, 14:44:30 GMT, Wolfgang Mauer wrote: > So i have to make the "new StatusList" !? > But how the glade-file "mainpaned" should look like??? Just remove the > StatusList ? OK, to instantiate it I think it needs to be a GtkChild. What error are you getti

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Wolfgang Mauer
Thanks a lot, one Class per template, i understood that, but i can't find [GtkTemplate] inside [GtkTemplate] Am 18.12.18 um 15:03 schrieb Steven Oliver: I used Gtk.Builder + Glade in my application. It might help to see it used in a "real application". https://github.com/steveno/balistica/bl

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Steven Oliver via vala-list
I used Gtk.Builder + Glade in my application. It might help to see it used in a "real application". https://github.com/steveno/balistica/blob/master/src/BalisticaApplication.vala#L80 Steven N. Oliver On Tue, Dec 18, 2018 at 8:39 AM Al Thomas via vala-list wrote: >>On Tuesday, 18 December

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Al Thomas via vala-list
>On Tuesday, 18 December 2018, 13:34:17 GMT, Wolfgang Mauer wrote: > Is there a way to have a GtkTemplate inside a GtkTemplate ? It sounds like you are trying to use a widget contained within another widget? I would try that in the GtkBuilder file. So the second widget is references as a

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Wolfgang Mauer
Is there a way to have a GtkTemplate inside a GtkTemplate ? Am 18.12.18 um 12:21 schrieb Wolfgang Mauer: Ok, thanks a lot! Am 18.12.18 um 12:09 schrieb Al Thomas: > On Tuesday, 18 December 2018, 09:27:06 GMT, Wolfgang Mauer wrote: > In vala tried Gtk.Builder "extend_with_template". > If i

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Wolfgang Mauer
Ok, thanks a lot! Am 18.12.18 um 12:09 schrieb Al Thomas: > On Tuesday, 18 December 2018, 09:27:06 GMT, Wolfgang Mauer wrote: > In vala tried Gtk.Builder "extend_with_template". > If i try this in vala with > [GtkChild] private Box mainBox; > i get the error "error: [GtkChild] is only allowe

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Al Thomas via vala-list
> On Tuesday, 18 December 2018, 09:27:06 GMT, Wolfgang Mauer wrote: > In vala tried Gtk.Builder "extend_with_template". > If i try this in vala with > [GtkChild] private Box mainBox; > i get the error "error: [GtkChild] is only allowed in classes with a [GtkTemplate] attribute" > Is there

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Wolfgang Mauer
Good example so far, but not answer my question... Am 18.12.18 um 12:00 schrieb Corentin Noël: Hi Wolfgang! You can find an example of Gtk.Builder with Vala soon in Valadoc itself (will be at this page once the site get refreshed: https://valadoc.org/gtk+-3.0/Gtk.Builder.html), in the meantime

Re: [Vala] C# developer, newbie question

2018-12-18 Thread Corentin Noël
Hi Wolfgang! You can find an example of Gtk.Builder with Vala soon in Valadoc itself (will be at this page once the site get refreshed: https://valadoc.org/gtk+-3.0/Gtk.Builder.html), in the meantime a complete example is available from this commit: https://github.com/Valadoc/valadoc-org/commit/