Re: buttons in for loop, GtkLabel



Anthony Thomasel wrote:

(snip) 
First, I can not create widgets from inside a for
loop.

I create widgets in loops.  No problem.  

I bet you have a straight C error, not gtk error, although it could be a
'gtk usage' error.  Without seeing the code that works and the code that
fails, I can't really say much more.

Second, in my application, I'm using a timer to update
info once a second, displaying it using a GtkLabel
widget. However, after the callback runs twice, it
stops for the rest of the time the app is open. I have
gone through and discovered if I comment out
gtk_label_set_text, the callback proceeds as expected.

What are you returning from the timeout function, TRUE in all cases? 
The only reason I can think of that gtk_label_set_text would stop your
timeout would be if it affected your return value.  Your timeout must
return TRUE to continue to be called.  (Apologies if you know and have
checked this.  Making guesses at your problem.)




Eric M. Monsler




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