Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-21 Thread cyberco
Oh boyI must have hit an all time programmers-low with this That was plain stupid. 2B > You don't need the lambda - you can use: > > wx.CallAfter(parent.OnRequest, param) -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-20 Thread Grant Edwards
On 2007-02-20, cyberco <[EMAIL PROTECTED]> wrote: > Ah! Great tip, thanks! > Now instead of calling: > > parent.onRequest(param) > > I call: > > wx.CallAfter(lambda x: parent.onRequest(x), param) How does that differ from this? wx.CallAfter(parent.onRequest, param) -- Grant Edwards

Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-20 Thread Chris Mellon
On 20 Feb 2007 12:01:02 -0800, cyberco <[EMAIL PROTECTED]> wrote: > Ah! Great tip, thanks! > Now instead of calling: > > parent.onRequest(param) > > I call: > > wx.CallAfter(lambda x: parent.onRequest(x), param) > You don't need the lambda - you can use: wx.CallAfter(parent.OnRequest, param) --

Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-20 Thread cyberco
Ah! Great tip, thanks! Now instead of calling: parent.onRequest(param) I call: wx.CallAfter(lambda x: parent.onRequest(x), param) Way cool. 2B > This is rather out of date. wxPython provides a wx.CallAfter function, > which will call the passed callable on the next spin through the event > l

Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-20 Thread Chris Mellon
On 2/20/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > cyberco wrote: > > > In my wxPython app a non-GUI thread (that reads info from the network) > > tries to open a frame to show the new info. This results in my app > > hanging (which is not too surprising). Coming from a C# environment I > >

Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-20 Thread Diez B. Roggisch
cyberco wrote: > In my wxPython app a non-GUI thread (that reads info from the network) > tries to open a frame to show the new info. This results in my app > hanging (which is not too surprising). Coming from a C# environment I > wonder if there is some sort of delegate mechanism in wxPython to d

wxPython: non-GUI thread launching new frame? Delegates?

2007-02-20 Thread cyberco
In my wxPython app a non-GUI thread (that reads info from the network) tries to open a frame to show the new info. This results in my app hanging (which is not too surprising). Coming from a C# environment I wonder if there is some sort of delegate mechanism in wxPython to do this sort of thing. 2