Crash in SplitTree classes

Just checked out the code and noted that Alberto has already seen to the
sorting fix - so overriding sorting from Python should now work. I have
three more fixes, but only the first of them is uncontroversial :slight_smile:

1) Line 857 of treelistctrl.cpp (v 1.1.2.5) - m_y should be a wxCoord
instead of a short. You get a funky truncated tree effect on large trees
otherwise.

2) I found that under windows, the sort used at line 2937 has pathological
behaviour in my application (large number of items to be sorted with lots of
repeated keys). It seems that it's using the system qsort. I have a version
of treelistctrl.cpp that can #ifdef in STL sort, and with my application
things work much better. I raised using STL sort in general on the wxdev
list, but Vadim still thinks that system qsort is the right choice.

Really - treelistctrl.cpp is not the right place to address this - but I'm
mentioning it here so that it gets logged in case others come up against
this issue.

3) For drag and drop with multiple selection, wxTreeListCtrl doesn't behave
as you might expect. In particular, if you select multiple items, and then
go to drag, clicking the left mouse button down on a selected item causes
all the other selected items to become deselected. This seems to be default
behaviour for all the list/tree widgets in wxWindows and it doesn't look
like it's possible to change using event veto'ing etc. I have a (relatively
simple) fix for treelistctrl.cpp which (IMHO) behaves better, but since it's
makes wxTreeListCtrl behave differently from all the other tree/list
widgets, it might not be a good candidate for inclusion.

In summary, I would recommend doing 1), and I'm happy enough to keep
patching my own copy to get 2) and 3).

S.

Sean Slattery wrote:

Just checked out the code and noted that Alberto has already seen to the
sorting fix - so overriding sorting from Python should now work. I have
three more fixes, but only the first of them is uncontroversial :slight_smile:

1) Line 857 of treelistctrl.cpp (v 1.1.2.5) - m_y should be a wxCoord
instead of a short. You get a funky truncated tree effect on large trees
otherwise.

Thanks for this. I had meant to ckeck if this had been fixed in this version of the tree code, but forgot about it. For the others I would prefer to not diverge more than necessary from the main tree control code since it would be nice to someday be able to merge things back in the future and make the wxTreeListCtrl be derived from the wxGenericTreeCtrl...

路路路

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

I've been hearing and seeing snippets like this for a while... is the
general consensus that wxWindows is moving toward non-native widgets
(a la Swing)?

路路路

On Tue, Jun 10, 2003 at 10:29:16AM -0700, Robin Dunn wrote:

it would be nice to someday be able to merge things back in
the future and make the wxTreeListCtrl be derived from the
wxGenericTreeCtrl...

--
Tim Lesher <tim@lesher.ws>
http://www.lesher.ws

Tim Lesher wrote:

it would be nice to someday be able to merge things back in the future and make the wxTreeListCtrl be derived from the wxGenericTreeCtrl...

I've been hearing and seeing snippets like this for a while... is the
general consensus that wxWindows is moving toward non-native widgets
(a la Swing)?

No, not really. There are a few generic controls that have been written such as the treectrl and listctrl that are currently used on non-Windows platforms mainly because they are either better than the native equivalents, or no one has wrapped the native equivalents yet. The gerneric controls can also be made available on Windows, but as a "second class citizen," the native one will be prefered and have the true classname.

There is also the wxUiversal port which is all self-drawn widgets for use on platforms that don't have native widgets (or good ones anyway) such as raw X11, embedded devices, MGL, etc. There is a desire to have these widgets available in the native ports too, but that hasn't been done yet. Also, I havn't done anything with wxPython and wxUniversal yet...

路路路

On Tue, Jun 10, 2003 at 10:29:16AM -0700, Robin Dunn wrote:

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