Re: GUI problem.



Hi Alberto,

Sorry, I've accidentally not replied to all.  But to punish myself for
doing this again I'll answer your question myself.

In general, what happens when you write a multi-threaded application
(that is not multi-thread safe) you'll see unpredictable results.
Sometimes you will see a bug, but change a line of unrelated code and
the bug will disappear.  Usually the bug will just manifest itself in
other ways.  This is what I think is happening to you.  UI lock-ups
are a classic sign of a non-multithread safe application.

I can debug your application but I am going to make a recommendation to you,

    Do not update the UI from any other thread other than the main thread!

Take my advice, or leave it, either way I will help you but it's
easier to change your application now, in its infancy, rather than
later.

Typically, multi-threaded applications are really hard to debug
because the offending code is related to the way the whole application
is written.  Do you have a SVN repository or a tarball that you can
send me?

Thanks,

Michael


On 20/11/2007, alberto barbaro <khlero83 gmail com> wrote:
Now until the various functions works the GUI don't responde and stay in a
gray state.
How can I resolv it?
Thanks


2007/11/20, alberto barbaro < khlero83 gmail com>:
Well now it works.
Thanks to all.


2007/11/20, alberto barbaro <khlero83 gmail com>:

yes.
gdk_threads_enter()
function();
gdk_threads_leave()

Have you a complete example? Only a small piace of code where there is
an GUI's update.

Thanks


2007/11/20, Michael Lamothe < michael lamothe gmail com>:

Are you locking with gdk_threads_enter/leave()?

Thanks,

Michael

On 20/11/2007, alberto barbaro <khlero83 gmail com> wrote:
Hi. I'm trying to develop a small application.

Problem:

I have a table with some buttons. I pass the pointer to the table in
a
thread, in that thread i would update the table with a some new
buttons. The
buttons will appeare but are not 'clickable'! Why? if I try return
thay
works but with the mouse no. Someone can help me?

Thanks
_______________________________________________
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]