On Sun, 2008-11-23 at 12:02 +0100, Jürg Billeter wrote:
> Hi Karl,
> 
> On Sun, 2008-11-23 at 10:46 +0000, Karl Lattimer wrote:
> > I have a button_press_event function in my GtkWidget which should be
> > called when the mouse button is pressed, however it won't output
> > anything via stdout.printf(...) on button press. Instead it outputs when
> > motion_notify_event is called, I'm wondering if there is any requirement
> > for a flushing of stdout to ensure that the button press text goes out
> > on screen immediately rather than the next time a printf is called.
> 
> There is no Vala-specific output buffering, however, stdout in C is line
> buffered by default, which means that you won't see the text until you
> print a newline, so stdout.printf ("...\n") might help if you're not
> adding a newline to the output yet.

Forgot to mention, you can also use stdout.flush () to explicitly flush
the output buffer (fflush in C).

Jürg

_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to