[wxPython] Return type of wxWindow.GetChildren()

Hi!

In the wxWindows documentation on
http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin407.htm#topic1051
it says:

wxWindow::GetChildren

wxList& GetChildren()

Returns a reference to the list of the window's children.

I take this to mean that wxWindow::GetChildren returns a wxList.
However, it seems to me that under wxPython, GetChildren() returns a
plain-old Python list object.

Is that correct?

Alexander Skwar

···

--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.iso-top.de | Jabber: askwar@a-message.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 13 hours 3 minutes

In the wxWindows documentation on
http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin407.htm#topic1051
it says:

wxWindow::GetChildren

wxList& GetChildren()

Returns a reference to the list of the window's children.

I take this to mean that wxWindow::GetChildren returns a wxList.

Yes.

However, it seems to me that under wxPython, GetChildren() returns a
plain-old Python list object.

Is that correct?

Yes.

···

On Tue, Apr 23, 2002 at 08:50:30PM +0200, Alexander Skwar wrote:

--
"paraphrased from some sig: it's not foolish to do foolish things,
it's foolish if we don't see the folly." --ttn, guile-user

I take this to mean that wxWindow::GetChildren returns a wxList.
However, it seems to me that under wxPython, GetChildren() returns a
plain-old Python list object.

Is that correct?

Yes. The wrapper traverses the wxList and creates a PyList from its
contents. The only downside to this is that since you get a copy it may not
truly reflect the window's children if you add or remove windows.

I've been contemplating changing it to return a list-like object that wraps
the real wxList so the contents would always be "live" but I havn't gotten
to it yet. (And probably won't for some time so patches are welcome.)

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!