wxCallAfter for C++
Vadim Zeitlin
vadim at wxwidgets.org
Wed Jun 6 03:16:52 PDT 2007
On Wed, 06 Jun 2007 03:03:10 -0700 Noel <NoelByron at gmx.net> wrote:
N> Is there something that emulates wxCallAfter in C++?
The trouble is that C++ is not as dynamic as Python and functions are not
first class objects in it. The simplest way to implement this in C++ would
be to have a queue of callbacks in wxApp and make wxCallAfter add the
function to this list.
The way I do it in C++ usually is to have a boolean member variable in the
class and set it whenever something needs to be done "after". The in
EVT_IDLE handler the required action is performed and the variable is
reset back to false.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list