GetStatusText() problem..

I’m confused on how this function works.

I’ve got a frame class that creates a status text object. I then call a Window class and set the frame status text object to something when my timer (a class in the Window class) executes a function. When I press a button in my frame to stop the timer, I try to reset the text to something else. The problem is that when I put the mouse in focus of the window, I see the previous text that I set when my Timer function executed and NOT the new text that I just set in my Frame from a PressButton() event. What’s going on here?

-M

···

Make every e-mail and IM count. [Join the i’m Initiative from Microsoft.](http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount)

It sounds like maybe you are not passing the new text to the Window
class, but more details needed. Can you send a small runnable sample
that reproduces the problem?

···

On Mon, May 19, 2008 at 4:14 PM, Marlin Rowley <marlin_rowley@hotmail.com> wrote:

I'm confused on how this function works.

I've got a frame class that creates a status text object. I then call a
Window class and set the frame status text object to something when my timer
(a class in the Window class) executes a function. When I press a button in
my frame to stop the timer, I try to reset the text to something else. The
problem is that when I put the mouse in focus of the window, I see the
previous text that I set when my Timer function executed and NOT the new
text that I just set in my Frame from a PressButton() event. What's going
on here?

-M

Marlin,

Marlin Rowley wrote:

I'm confused on how this function works.

I've got a frame class that creates a status text object. I then call a Window class and set the frame status text object to something when my timer (a class in the Window class) executes a function. When I press a button in my frame to stop the timer, I try to reset the text to something else. The problem is that when I put the mouse in focus of the window, I see the previous text that I set when my Timer function executed and NOT the new text that I just set in my Frame from a PressButton() event. What's going on here?

You are stopping the timer first and then set the status text?

Maybe using wx.CallAfter to set the status text will do the trick.

Werner

Thanks Werner! I’ll try that…

···

Date: Tue, 20 May 2008 08:41:12 +0200
From: werner.bruhin@free.fr
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] GetStatusText() problem…

Marlin,

Marlin Rowley wrote:

I’m confused on how this function works.

I’ve got a frame class that creates a status text object. I then call
a Window class and set the frame status text object to something when
my timer (a class in the Window class) executes a function. When I
press a button in my frame to stop the timer, I try to reset the text
to something else. The problem is that when I put the mouse in focus
of the window, I see the previous text that I set when my Timer
function executed and NOT the new text that I just set in my Frame
from a PressButton() event. What’s going on here?
You are stopping the timer first and then set the status text?

Maybe using wx.CallAfter to set the status text will do the trick.

Werner


wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Keep your kids safer online with Windows Live Family Safety. Help protect your kids.