Re: Continuous variable updation in a text box



It wouldn't matter too much, since most screens would only have a refresh rate of 60-120 Hz, which is also much higher than what most people can even see.

I've handled such cases by using g_idle_add when I get an update of the variable's status, and have the idle function update the text box. I preserve the event source ID for the next call, and check if that source is still available. If so, I remove the event using g_source_remove and add a new idle event. This way, the most recent update is shown on screen the next time my program goes idle. The idle function then marks the source as free, by setting it to zero.

-Jim

Ardhan Madras wrote:
So you will need call textbox insertion (update) 1000 times per second or the textbox get updated every 1ms, 
my question is: Can you see it changes correctly with given cycle?

--- adeelmalik78 yahoo com wrote:

From: Adeel Malik <adeelmalik78 yahoo com>
To: gtk-app-devel-list gnome org
Subject: Continuous variable updation in a text box
Date: Tue, 10 Mar 2009 02:48:15 -0700 (PDT)

I intend to monitor the variable's value (acquired via data acquisition hardware) at a rate of around 1,000 
times per second.
I haven't used textboxes before in GTK+. Could anyone suggest how to update the value of a variable in a 
textbox etc., at this rate.
Thanks,
Adeel


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




_____________________________________________________________
Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]