Hi All,
...just a quick thanks for the replies to my previous post!
It seems that the wxMDIChildren of a wxMDIParentFrame are
handled a bit differently between Linux and Windows, for the
same code.
The app is an MDIParent frame that utilizes several (static) sash windows
along with (dynamic) editable source files. The dynamic windows are
instantiated as MDIChildren. On Linux, the dynamic children are held
within a container (MDIClientWindow), but on Windows they're not.
E.g.,
On Windows, with several MDIChildren open, using GetChildren( ), I get
the output shown in example 1 below. The pointers to the children are listed
toward the end of the trace. But the same code running on Linux with several
MDIChildren open and using GetChildren( ), gives the output shown in example 2
trace below.
In example 2, there are no pointers to any of the MDIChidren, but rather
there's a pointer to an wxMDIClientWindow, which in turn holds the pointers
to the MDIChildren.
Newly spawned children are added to the wxMDIClientWindow container
automatically and those that are destroyed are removed from the container
[on Linux]. In contrast, the wxMDIClientWindow on the Windows platform remains
empty all the time, regardless of what's happening with the MDIChildren.
As a side note, on the Windows platform, I was able to manually add pointers from
newly created MDIChildren to the MDIClientWindow container. So, does this mean
that an MDIClientWindow is created but is not used, on the Window's platform?
I searched the mail archive and found several MDIParent and MDIClientWindow related
questions that discussed a two-step frame construction process, which is also
discussed in the documentation, but I've not been very successful at
implementing it.
Actually, I figured I'd ask for input before I started beating my head against
a wall in an attempt to implement something that won't work in the first place.
...enough babbling on my end...any input to the following question would be
greatly appreciated:
···
--------------------------------------------------------------------------------------------------
1. If the two-step frame construction process is used to create the MDIParentFrame
on the Windows platform, will the wxMDIClientWindow container then be used to store
the MDIChildren automatically?
2. If the answer to question 1 is yes, will this have any side-effects on the Linux platform
in relation to the way the current wxMDIClientWindow functions. I.e., will a second
client window be created or is the two-step process ignored on Linux? Probably a
stupid question but I'll feel better knowing for certain...
3. Has anyone successfully implemented the two-step frame creation process
for an MDIParent frame?
4. If the answer to question 1 is no, then is there something that someone knows about that
might be causing the discrepancy in behavior noted between the two platforms?
5 And lastly, if the two-step process won't change the behavior on the Windows platform, is
there a way to get the client window to be used on the Windows platform, or conversely, not
used when run on the Linux platform?
I'm assuming that if this were a coding problem that it would manifest itself as an error across
both platforms, rather than the selective behavior noted here. But let me know otherwise.
Thanks a bunch,
Joe
##################
Example 1. Windows platform - GetChildren( ) used, pointers to MDIChildren follow the
static window pointers.
--------------------------------------------------------------------------------------------------------------------------
[<wxPython.windows3.wxSashLayoutWindow instance; proxy of C++ wxSashLayoutWindow
instance at _96b008_wxSashLayoutWindow_p>, <wxPython.windows3.wxSashLayoutWindo
w instance; proxy of C++ wxSashLayoutWindow instance at _fbed30_wxSashLayoutWind
ow_p>, <wxPython.windows3.wxSashLayoutWindow instance; proxy of C++ wxSashLayout
Window instance at _139a978_wxSashLayoutWindow_p>, <wxPython.stattool.wxStatusBa
rPtr instance; proxy of C++ wxStatusBar instance at _120a430_wxStatusBar_p>, <m_
Child.m_Child instance; proxy of C++ wxMDIChildFrame instance at _14f49d0_wxMDIC
hildFrame_p>, <m_Child.m_Child instance; proxy of C++ wxMDIChildFrame instance a
t _1513cd8_wxMDIChildFrame_p>]
##################
Example 2. Linux platform- GetChildren( ) used, "no" pointers to any MDIChildren shown,
but rather a pointer to an MDIClientWindow (first item), which does contain the pointers to MDIChildren.
-----------------------------------------------------------------------------------------------------------------------------------
[<wxPython.mdi.wxMDIClientWindowPtr instance; proxy of C++ wxMDIClientWindow instance at _8458808_wxMDIClientWindow_p>, <wxPython.windows3.wxSashLayoutWindow instance; proxy of C++ wxSashLayoutWindow instance at _8459798_wxSashLayoutWindow_p>, <wxPython.windows3.wxSashLayoutWindow instance; proxy of C++ wxSashLayoutWindow instance at _845ac40_wxSashLayoutWindow_p>, <wxPython.windows3.wxSashLayoutWindow instance; proxy of C++ wxSashLayoutWindow instance at _84659c0_wxSashLayoutWindow_p>]
##################
Joseph D. Poirier
DSP Software
IMN, Nokia Inc.
6000 Connection Drive
Irving, TX 75039