lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] wx pre-3.3.0 warning


From: Vadim Zeitlin
Subject: Re: [lmi] wx pre-3.3.0 warning
Date: Fri, 5 May 2023 02:18:11 +0200

On Fri, 5 May 2023 00:08:58 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> Running the automated GUI test with wx pre-3.3.0, I observe:
GC> 
GC> create_open_database: started
GC> Element wxStaticText@00000000025b85d0 ("X axis", HWND=00000000000a03d6) of 
wxStaticBoxSizer s
GC> hould be created as child of its wxStaticBox and not of 
wxPanel@00000000025b2180 ("panel", HW
GC> ND=00000000000a0440).
GC> Element wxStaticText@000000000259fca0 ("X axis", HWND=00000000000a0476) of 
wxStaticBoxSizer s
GC> hould be created as child of its wxStaticBox and not of 
wxPanel@0000000000cc8f00 ("panel", HW
GC> ND=000000000008009e).
GC> time=569ms (for create_open_database)
GC> create_open_database: ok
GC> 
GC> and something similar for the 'create_open_strata' test.
GC> Both tests succeed, and the controls seem to work just
GC> fine in my limited manual testing.

 Yes, these warnings are harmless, but indicate places where things
could/should be improved by creating the controls located inside
wxStaticBox as its children, which is the recommended way of doing it
since wx 2.9.1 or thereabouts.

GC> As far as I can guess, this pertains to MultiDimGrid::Create():
GC> 
GC>     // setting self as a wxPanel
GC>     wxPanel::Create(parent, id, pos, size);
GC>     ...
GC>     wxStaticBoxSizer* const sizer =
GC>         new(wx) wxStaticBoxSizer(wxHORIZONTAL, this, "Axis");
GC> 
GC> where no explicit wxStaticBox is created at all.

 It's created implicitly by wxStaticBoxSizer and can be retrieved (in order
to be used as parent for the other windows) using its GetStaticBox()
function.

GC> I'm disinclined to touch that code. I suspect that the
GC> imperfection now diagnosed has always existed, but
GC> simply wasn't diagnosed in the past, yet AFAICT it
GC> seems benign.

 Yes, the behaviour hasn't changed, but internally wxMSW works even harder
than before now to handle this case (if it didn't, windows created as
siblings of the static box but located inside it would be completely
invisible when using compositing, i.e. by default), so it looked like a
good idea to add these warnings. I know they're annoying and we may yet add
a way to disable them before 3.4.0 release if people complain sufficiently,
but I wanted to at least give those who'd like to fix their code a chance
to do it during 3.3.

 Please let me know if you have any other questions about this,
VZ

Attachment: pgp_e16aQguQU.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]