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?
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?
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.
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.