[Vala] Is there a reason why I can't define a const variable in a method?

2008-03-30 Thread Jaap A. Haitsma
Hi, Having a const variable inside a method gives a compiler error. Is this intentional or just a missing feature from the compiler? Jaap ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] Critical error of valac when using ActionEntry

2008-03-30 Thread Jaap A. Haitsma
Hi, When I compile attached sample program, vala gives the following error ** (valac:23138): CRITICAL **: vala_data_type_get_transfers_ownership: assertion `VALA_IS_DATA_TYPE (self)' failed The resulting C code seems to be fine. I'm running the latest vala from SVN Jaap sample.vala Descripti

Re: [Vala] stdout.printf not working correctly in GTK+ program

2008-03-30 Thread Ed Schouten
* Jaap A. Haitsma <[EMAIL PROTECTED]> wrote: > If I use stdout.printf in a GTK+ program, I'm not seeing anything > happening on the console. Only when I close the app the text appears > on the console. By default, stdin/stdout/stderr is line based. Try adding a "\n" to the end of the string you're

Re: [Vala] stdout.printf not working correctly in GTK+ program

2008-03-30 Thread Ali Sabil
use stdout.printf ("hello\n"); to force the buffers to be flushed. 2008/3/30 Jaap A. Haitsma <[EMAIL PROTECTED]>: > Hi, > > If I use stdout.printf in a GTK+ program, I'm not seeing anything > happening on the console. Only when I close the app the text appears > on the console. > > The attache

[Vala] stdout.printf not working correctly in GTK+ program

2008-03-30 Thread Jaap A. Haitsma
Hi, If I use stdout.printf in a GTK+ program, I'm not seeing anything happening on the console. Only when I close the app the text appears on the console. The attached sample shows this behavior. Compile with valac --pkg gtk+-2.0 -o sample sample.vala If you press the button no output in the ter

Re: [Vala] Problem adding gstreamer option group to context?

2008-03-30 Thread Jaap A. Haitsma
On Sun, Mar 30, 2008 at 9:56 PM, Jaap A. Haitsma <[EMAIL PROTECTED]> wrote: > On Sun, Mar 30, 2008 at 7:47 PM, Sandino Flores Moreno <[EMAIL PROTECTED]> > wrote: > > This line is wrong: > > > > context.add_group (Gst.init_get_option_group ()); > > > > It should be replaced as follows: >

Re: [Vala] Problem adding gstreamer option group to context?

2008-03-30 Thread Jaap A. Haitsma
On Sun, Mar 30, 2008 at 7:47 PM, Sandino Flores Moreno <[EMAIL PROTECTED]> wrote: > This line is wrong: > > context.add_group (Gst.init_get_option_group ()); > > It should be replaced as follows: > weak GLib.OptionGroup gst_opt_group = Gst.init_get_option_group (); > context.add_group

[Vala] Problem adding gstreamer option group to context?

2008-03-30 Thread Jaap A. Haitsma
Hi, The following excerpt fails because of context.add_group (Gst.init_get_option_group ()); var context = new OptionContext (_("foo")); context.set_help_enabled (true); context.add_main_entries (options, null); context.add_group (Gtk.get_option_group (true)); context.add_group (Gst.init_get_opti