On Sun, Jul 3, 2011 at 11:49 AM, Daniel Svensson <[email protected]> wrote:
> On Sat, Jul 2, 2011 at 3:57 PM, Sepehr Aryani <[email protected]> wrote:
>> does not work well for me. Besides I need to pass Gtk.builder reference to 
>> MyWindow to be able to handle the ui inside my custom window class. In C++ 
>> we could do this using get_widget_derived. I didn't see the same mechanism 
>> in Vala's gtk library. would someone please help me?
>
> Do you have MyWindow in your .ui file?
>
> I do this quite extensively in my application, here is one example:
> http://git.xmms.se/xmms2/abraca/tree/src/components/server/server_browser.vala#n42
>
> and the .ui-file:
> http://git.xmms.se/xmms2/abraca/tree/data/ui/server_browser.xml#n18
>
> it was a while since I wrote that and I'm not sure if you need to
> explicitly add the Buildable interface or if that comes with the
> widget you inherit.. but anyway.. something like that ought to get you
> started.

And if you still want to be able to edit your .ui-files in glade, you
have to build glade modules for your widgets too. You can find details
on how to do that in the above mentioned git repository too.

-- 
Daniel Svensson
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to