[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Determine whether window created yet [Was: [lmi] wx segfault iterating o
From: |
Greg Chicares |
Subject: |
Determine whether window created yet [Was: [lmi] wx segfault iterating on GetChildren()] |
Date: |
Sat, 11 Mar 2006 14:36:07 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
On 2006-3-11 13:07 UTC, Greg Chicares wrote:
>
> Probably I'll
> have to add special logic to prevent vetoing a page change
> if IsShown() returns false.
It's somewhat distasteful to use IsShown() to determine whether
a window has been "fully created". After all, a notebook that was
once shown may be temporarily hidden. But is there any better way?
I use IsShown() only for wxDialog or similar classes like
wxNotebook: classes that handle GUI input. I use it to avoid
doing things that shouldn't be done while the window is in the
process of being created--like vetoing a notebook page change.
The ancient 'owl' library had a "FullyCreated" flag. In wx terms,
it would be set after EVT_INIT_DIALOG, and cleared when Destroy()
is called. I've looked at all the member variables in wxWindow and
wxDialog, but can't find anything that works that way. GetId()
already has a value distinct from wxID_ANY at the time of the
EVT_NOTEBOOK_PAGE_CHANGING event, which is before the notebook is
shown.
I guess I could derive from wxDialog and implement my own
"FullyCreated" flag this way. Hasn't anyone else ever wished for
something like this?
- Re: [lmi] wx segfault iterating on GetChildren(), (continued)
- [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 <=