Re: [Tutor] threading problem in GUI

2005-09-16 Thread Jacob S.
> Hello there ! > i am having a problem with threading. > OK, i have this GUI app that i am building with pygtk. > there is a process (four actually, just working on getting one right now) > that needs to run in the background. > there is a button that starts the background function. But, it locks

Re: [Tutor] [tutor] threading problem in GUI

2005-09-08 Thread nephish
Pierre Barbier de Reuille wrote: >Great :) > >Just to be clear about that: you can see the "connect" line as a dynamic >registration process (with the symetric disconnect operation available >via ... "disconnect"). The only thing you need is to connect (at >runtime) the even before it's called (ob

Re: [Tutor] [tutor] threading problem in GUI

2005-09-08 Thread Pierre Barbier de Reuille
Great :) Just to be clear about that: you can see the "connect" line as a dynamic registration process (with the symetric disconnect operation available via ... "disconnect"). The only thing you need is to connect (at runtime) the even before it's called (obvious isn't it ? ;) ), but you have no o

Re: [Tutor] [tutor] threading problem in GUI

2005-09-07 Thread nephish
Pierre Barbier de Reuille wrote: >nephish a écrit : > > >>one more thing. >>if i uncomment the lines >>gtk.threads_enter() >>and >>gtk.threads_leave() >>the whole thing locks up when the function is called. >>the gui, and the thread both lock up. >> >> > >Well, that's just normal. However, w

Re: [Tutor] [tutor] threading problem in GUI

2005-09-07 Thread nephish
Pierre Barbier de Reuille wrote: >nephish a écrit : > > >>one more thing. >>if i uncomment the lines >>gtk.threads_enter() >>and >>gtk.threads_leave() >>the whole thing locks up when the function is called. >>the gui, and the thread both lock up. >> >> > >Well, that's just normal. However, w

Re: [Tutor] [tutor] threading problem in GUI

2005-09-07 Thread Pierre Barbier de Reuille
nephish a écrit : > > one more thing. > if i uncomment the lines > gtk.threads_enter() > and > gtk.threads_leave() > the whole thing locks up when the function is called. > the gui, and the thread both lock up. Well, that's just normal. However, what you should do is to send a signal from your th

Re: [Tutor] [tutor] threading problem in GUI

2005-09-07 Thread nephish
nephish wrote: > Serial1() just call the function ... it will be evaluated and then the > result will be sent to Thread.start ... > > So try: > > Thread.start(Serial) > > >ok, >so far the thread runs fine in the background, but just does not send the >output to the >textb

Re: [Tutor] [tutor] threading problem in GUI

2005-09-07 Thread nephish
Serial1() just call the function ... it will be evaluated and then the result will be sent to Thread.start ... So try: Thread.start(Serial) ok, so far the thread runs fine in the background, but just does not send the output to the textbuffer, and hangs up th

Re: [Tutor] threading problem in GUI

2005-09-07 Thread Pierre Barbier de Reuille
Ok, comments inside your code ... nephish a écrit : > Pierre Barbier de Reuille wrote: > >> nephish a écrit : >> >> >>> Pierre Barbier de Reuille wrote: >>> >>> [...] >>> ok, i am still having a little problem understanding. >>> tried it but i don't know if i have things set in the right order.

Re: [Tutor] threading problem in GUI

2005-09-06 Thread nephish
Pierre Barbier de Reuille wrote: >nephish a écrit : > > >>Pierre Barbier de Reuille wrote: >> >>[...] >>ok, i am still having a little problem understanding. >>tried it but i don't know if i have things set in the right order. >> >> >>gtk.gdk.threads_init() >># Here initialize what you want >>[.

Re: [Tutor] threading problem in GUI

2005-09-06 Thread Pierre Barbier de Reuille
nephish a écrit : > Pierre Barbier de Reuille wrote: > > [...] > ok, i am still having a little problem understanding. > tried it but i don't know if i have things set in the right order. > > > gtk.gdk.threads_init() > # Here initialize what you want > [...] > # Launch the Gtk loop > gtk.gdk.t

Re: [Tutor] threading problem in GUI

2005-09-06 Thread nephish
Pierre Barbier de Reuille wrote: >nephish a écrit : > > >>Hello there ! >> >> > >Hello, > > > >>i am having a problem with threading. >>OK, i have this GUI app that i am building with pygtk. >>there is a process (four actually, just working on getting one right now) >>that needs to run in

Re: [Tutor] threading problem in GUI

2005-09-06 Thread Pierre Barbier de Reuille
nephish a écrit : > Hello there ! Hello, > i am having a problem with threading. > OK, i have this GUI app that i am building with pygtk. > there is a process (four actually, just working on getting one right now) > that needs to run in the background. Please, do not mix "process" and "threads"

[Tutor] threading problem in GUI

2005-09-06 Thread nephish
Hello there ! i am having a problem with threading. OK, i have this GUI app that i am building with pygtk. there is a process (four actually, just working on getting one right now) that needs to run in the background. there is a button that starts the background function. But, it locks up the gui.