[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determine whether window created yet [Was: [lmi] wx segfault iterati
From: |
Vadim Zeitlin |
Subject: |
Re: Determine whether window created yet [Was: [lmi] wx segfault iterating on GetChildren()] |
Date: |
Sat, 11 Mar 2006 16:06:37 +0100 |
On Sat, 11 Mar 2006 14:36:07 +0000 Greg Chicares <address@hidden> wrote:
GC> It's somewhat distasteful to use IsShown() to determine whether
GC> a window has been "fully created". After all, a notebook that was
GC> once shown may be temporarily hidden. But is there any better way?
No, not out of the box. But you can assume that the window is fully
created as soon as you get almost any message for it so it's common to set
a m_isCreated flag in EVT_WINDOW_CREATE or even EVT_SIZE or EVT_IDLE
handlers.
GC> I use IsShown() only for wxDialog or similar classes like
GC> wxNotebook: classes that handle GUI input. I use it to avoid
GC> doing things that shouldn't be done while the window is in the
GC> process of being created--like vetoing a notebook page change.
The easiest way to work around this is to not use the static event table
but use Connect() to only connect your EVT_PAGE_CHANGING handler after the
notebook is fully created.
Regards,
VZ
- Old libstdc++ problem with 'alert.cpp' [Was: [lmi] wx segfault iterating on GetChildren()], (continued)
- Old libstdc++ problem with 'alert.cpp' [Was: [lmi] wx segfault iterating on GetChildren()], Greg Chicares, 2006/03/17
- [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()], Greg Chicares, 2006/03/20
- Re: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()], Evgeniy Tarassov, 2006/03/22
- Re[2]: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()], Vadim Zeitlin, 2006/03/22
- Re: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()], Greg Chicares, 2006/03/22
- [lmi] Don't do that! [Was: Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3], Greg Chicares, 2006/03/27
- Re: Re[2]: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()], Evgeniy Tarassov, 2006/03/22
- Re[4]: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()], Vadim Zeitlin, 2006/03/22
- Re[2]: [lmi] wx segfault iterating on GetChildren(), Vadim Zeitlin, 2006/03/21
Determine whether window created yet [Was: [lmi] wx segfault iterating on GetChildren()], Greg Chicares, 2006/03/11
- Re: Determine whether window created yet [Was: [lmi] wx segfault iterating on GetChildren()],
Vadim Zeitlin <=