Re: RE : Re: Why does my cursor doesn't change



hi;

On Tue, 2007-04-03 at 07:51 -0400, Zurd wrote:
--- Emmanuele Bassi <ebassi gmail com> a Ãcrit :

hey;

On Tue, 2007-04-03 at 06:44 -0400, Zurd wrote:
Hi, here's a very simple script.  I'm wondering why this program
doesn't change the cursor while it's looping to reach 99999999.
I have the same problem in my software.

you are blocking the main loop to spin, so you don't get updates on the
UI.

Now, how do I overcome this?

well, not blocking GTK+ main loop with a while(1) loop of your own might
be a good start. why do you need such while(1) loop in the first place
might be of interest in order to tell you what to do instead.

in general:

   Thou shalt never ever block the Main Loop from spinning

is a tenet that should be held dear by every developer using GTK+.

/me considers adding a big entry on the FAQ telling people not to do
really stupid things, like writing GUI applications as they were console
applications.

This is a great idea, could you post it on http://gtk2-perl.sourceforge.net/doc ?
I've read everything there and I didn't see this kind of information in it.
I'm sure there's plenty more people asking themselves the same thing.

the FAQ is on the wiki:

  http://live.gnome.org/GTK2-Perl/FrequentlyAskedQuestions

as it makes simpler to edit stuff without having to update the website.

indeed there are plenty of people writing Gtk2 applications like shell
scripts and old console applications in general; I'll give a talk at
this year's Nordic Perl Workshop (and another one hopefully at GUADEC
2007 in July) and I will specifically point out this issue.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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