Re: GTK2 hangs or does not updates



I really want to tank you all, using the Glib::Timeout->add function the updates has been done ok. I will check the program changes, but know it is working fine.

You are great support & friends.



2010/6/23 Martin Schlemmer <Martin Schlemmer nwu ac za>
>>> On 2010/06/22 at 04:08 PM, PS <kaligod gmail com> wrote:

Hi

Sorry, got distracted. ÂThe more complete answer is to the list.


Cheers

Martin

> Hello Martin. I appreciate your help, but currently as I said I am a newbie,
> I attached my small program, I will thank you a lot if you can say to me
> where to introduce the code into my program and what type of code you
> suggest.
>
> I am really on hold.
>
> Thanks
>
> 2010/6/22 Martin Schlemmer <Martin Schlemmer nwu ac za>
>
>> >>> On 2010/06/22 at 04:32 AM, PS <kaligod gmail com> wrote:
>>
>> Hi,
>>
>> > Currently I am introducing myself to the perl-gtk GUI programming. My
>> first
>> > program is a dashboard that should update every minute, it can update a
>> > couple times but no more, the main GTK windows hangs and no more updates
>> are
>> > possible.
>> >
>> > The main thread is the GUI and has two secondary threads, one if for
>> > catching the time and the second one of for making the updates to the
>> > labels. I know the threads are working ok, if a print the result of the
>> > update to the console I can see it is running fine, but again, the
>> windows
>> > hangs (freezes itself) and no more updates are possible.
>> >
>>
>> I do not know with Linux, but in Windows you should only initialize Gtk2 in
>> one thread (I usually use the main one), and then only do updates to the GUI
>> from that thread. ÂIf you are waiting for something from another thread, you
>> need to keep updating the MainLoop while waiting for the data from the
>> second thread. ÂBad things happen if you update the GUI from a second
>> thread.
>>
>> Something like attached - it was a quick bit of copy and paste, so please
>> be gentle :-)
>>
>>
>> Regards,
>>
>> Martin
>>
>>
>> > May you help me?
>> >
>> > Pablo Soto
>>
>>
>>
>> Vrywaringsklousule / Disclaimer:
>> http://www.nwu.ac.za/it/gov-man/disclaimer.html
>>
>>



Vrywaringsklousule / Disclaimer: Âhttp://www.nwu.ac.za/it/gov-man/disclaimer.html




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