[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: |
Greg Chicares |
Subject: |
Re: Determine whether window created yet [Was: [lmi] wx segfault iterating on GetChildren()] |
Date: |
Wed, 15 Mar 2006 17:23:41 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
On 2006-3-11 15:06 UTC, Vadim Zeitlin wrote:
> 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.
Okay. I want to add a variable to a wxDialog-derived class:
/// is_fully_created_: True iff dialog construction has completed and
/// destruction has not yet begun.
The ctor initializes it to false.
Some event handler sets it to true (probably I'll use EVT_INIT_DIALOG).
When should I change its value back to false, so that I can use this
flag to prevent a dialog that's in the process of destruction from
trying to do something it shouldn't?
- a wxWindow::Destroy() virtual override?
- an EVT_CLOSE handler?
- my class's destructor?
- [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: 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, 2006/03/11