Hello.
In the application that I'm writing, I'm traversing a directory tree.
Obviously, this is done using a recursive algorithm and this can take
some time. When I call the method which walks the tree, I cannot move
the window of my application around. Also, when I move another window
over it, my applications window doesn't redraw.
What can I do to make wxPython/wxWindows process system messages, so
that I can move the window and that the window redraws?
Thanks,
Alexander Skwar
···
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.iso-top.biz | Jabber: askwar@a-message.de
iso-top.biz - Die günstige Art an Linux Distributionen zu kommen
Uptime: 7 hours 14 minutes
Place a call to wx.wxYield() inside of the long running loop.
for x in range(lots):
do stuff
wx.Yield()
I saw reference to a safe yeild in the wxWindows docs too, but have not
studied up on it.
···
----- Original Message -----
From: "Alexander Skwar" <lists.ASkwar@email-server.info>
To: "wxPython Mailingliste" <wxPython-users@lists.wxwindows.org>
Sent: Saturday, March 08, 2003 6:01 PM
Subject: [wxPython-users] Processing system messages?
Hello.
In the application that I'm writing, I'm traversing a directory tree.
Obviously, this is done using a recursive algorithm and this can take
some time. When I call the method which walks the tree, I cannot move
the window of my application around. Also, when I move another window
over it, my applications window doesn't redraw.
What can I do to make wxPython/wxWindows process system messages, so
that I can move the window and that the window redraws?
Thanks,
Alexander Skwar
So sprach Joe Brown am 2003-03-08 um 18:11:41 -0500 :
Place a call to wx.wxYield() inside of the long running loop.
Thanks, works good!
However, just like described in the documentation, the app is now "too
responsive". With this, I mean that I'm now able to change things like
checkboxes on the frame. There's also wxSafeYield which is supposed to
"fix" this - however, when I call wxSafeYield instead of wxYield, I can
no longer move the window (on Windows). Guess I'll have to figure out a
loop which disables all the controls on the frame prior to calling this
method.
Alexander Skwar
···
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.iso-top.biz | Jabber: askwar@a-message.de
iso-top.biz - Die günstige Art an Linux Distributionen zu kommen
Uptime: 8 hours 14 minutes
So sprach Joe Brown am 2003-03-08 um 18:11:41 -0500 :
Place a call to wx.wxYield() inside of the long running loop.
This calls ::wxYield, doesn't it? In the documentation, it says that
wxApp::wxYield should be called instead. I'm trying to do all this from
within a method which is in a module containg my frame. The applicaiton
itself just imports the module with the frame and calls frame.create().
How can I get a handle to the application (wxApp) object from within the
frame?
Thanks,
Alexander Skwar
···
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.iso-top.biz | Jabber: askwar@a-message.de
iso-top.biz - Die günstige Art an Linux Distributionen zu kommen
Uptime: 8 hours 22 minutes