wxTreeCtrl.GetSelections() Question

wxTreeCtrl.GetSelections() seems to do something different than documented in wxWindows manual 2.4.2.
The doc says it the wxPathon function accepts no parameters.
I am using python 2.3.2, wxPython 2.4.1.2 on Win2000 SP4.

What´s wrong ?

Thanks,
    Uwe Grauer

Uwe Grauer wrote:

wxTreeCtrl.GetSelections() seems to do something different than documented in wxWindows manual 2.4.2.
The doc says it the wxPathon function accepts no parameters.
I am using python 2.3.2, wxPython 2.4.1.2 on Win2000 SP4.

Correct. Instead of taking a reference to a wxArray to be filled up and returning nothing, the Python wrapper takes nothing and uses an internal array and then converts that to a Python list that it returns.

What problem are you having?

···

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

Robin Dunn wrote:

Uwe Grauer wrote:

wxTreeCtrl.GetSelections() seems to do something different than documented in wxWindows manual 2.4.2.
The doc says it the wxPathon function accepts no parameters.
I am using python 2.3.2, wxPython 2.4.1.2 on Win2000 SP4.

Correct. Instead of taking a reference to a wxArray to be filled up and returning nothing, the Python wrapper takes nothing and uses an internal array and then converts that to a Python list that it returns.

What problem are you having?

It is throwing an exception:
TypeError: wxTreeListCtrl_GetSelections() takes exactly 2 arguments (1 given)

So it does something different than documented.

Robin Dunn wrote:

Uwe Grauer wrote:

wxTreeCtrl.GetSelections() seems to do something different than documented in wxWindows manual 2.4.2.
The doc says it the wxPathon function accepts no parameters.
I am using python 2.3.2, wxPython 2.4.1.2 on Win2000 SP4.

Correct. Instead of taking a reference to a wxArray to be filled up and returning nothing, the Python wrapper takes nothing and uses an internal array and then converts that to a Python list that it returns.

What problem are you having?

Yust upgraded to wxPython 2.4.2.4. Before i used 2.4.1.4.
Sorry, this works as documented in the new version.

Regards,
   Uwe

Uwe Grauer wrote:

Robin Dunn wrote:

Uwe Grauer wrote:

wxTreeCtrl.GetSelections() seems to do something different than documented in wxWindows manual 2.4.2.
The doc says it the wxPathon function accepts no parameters.
I am using python 2.3.2, wxPython 2.4.1.2 on Win2000 SP4.

Correct. Instead of taking a reference to a wxArray to be filled up and returning nothing, the Python wrapper takes nothing and uses an internal array and then converts that to a Python list that it returns.

What problem are you having?

Yust upgraded to wxPython 2.4.2.4. Before i used 2.4.1.4.
Sorry, this works as documented in the new version.

Good. I was just about to suggest that you update. I don't remember making that change that recently but I guess I did.

···

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