need 1 event to bind to open status window + start data gathering, struggling

I have a frame with some status information in it and some code that
gathers the information which takes some seconds to run.

First I called my status window class to draw the status window then
gathered the info. The status window was drawn but not even the
default rich text was displayed till the data gathering was complete
and the method ended, the window was buff colored and had an
unnecessary scroll bar, once data gathering completed the window
displayed as expected ... mmm

I tried self.Refresh() ... no difference

So thinking I decided to perform the two processes independently by
getting the click event to bind to both independently then communicate
via pubsub. But only the last Bind command was actioned ... mmm

So short of subprocessing, something I really don't want to do, any
ideas on how to resolve this elegantly ?

Cheers

Dave

···

--

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Start your data gathering in a separate thread right near the beginning
and have it raise an event with the data when it is finished/has some
data, in your window bind to the event and change the status bar from
"Waiting for data!" to the data attached to the event. See the demo on
long running tasks.

Gadget/Steve

···

On 06/05/2012 9:25 AM, dave selby wrote:

I have a frame with some status information in it and some code that
gathers the information which takes some seconds to run.

First I called my status window class to draw the status window then
gathered the info. The status window was drawn but not even the
default rich text was displayed till the data gathering was complete
and the method ended, the window was buff colored and had an
unnecessary scroll bar, once data gathering completed the window
displayed as expected ... mmm

I tried self.Refresh() ... no difference

So thinking I decided to perform the two processes independently by
getting the click event to bind to both independently then communicate
via pubsub. But only the last Bind command was actioned ... mmm

So short of subprocessing, something I really don't want to do, any
ideas on how to resolve this elegantly ?

Cheers

Dave

Start your data gathering in a separate thread right near the beginning
and have it raise an event with the data when it is finished/has some
data, in your window bind to the event and change the status bar from
"Waiting for data!" to the data attached to the event. See the demo on
long running tasks.

Gadget/Steve

Thanks for that, looking at it right now :slight_smile:

Cheers

Dave