Re: [Vala] stdout flushing? and button_click_event
- From: Jürg Billeter <j bitron ch>
- To: Karl Lattimer <karl qdh org uk>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] stdout flushing? and button_click_event
- Date: Sun, 23 Nov 2008 12:05:59 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]