[wxruby-users] Different (tree) event behaviors across platforms

Chauk-Mean P chauk.mean at gmail.com
Fri Mar 14 10:50:33 EDT 2008


Hi,

2008/3/13, Alex Fenton <alex at pressure.to>:

> Thank you for the report and test cases. As you know wxWidgets wraps
> native controls and the native event loop, and there are some subtle
> differences sometimes. From experience I think there are more of these
> in TreeCtrl than anywhere else - it's probably because it's the most
> complex native-wrapped control.

Unfortunately, it is also one of the most useful control :-).

> In most cases they're wxWidgets issues, though ultimately the only way
> to verify this is to write a C++ sample. As for official docs, we're
> limited to what's in the wxWidgets docs, plus any annotations we make.
> In the past I've turned up useful confirmations of subtler
> cross-platform differences by searching for info on wxPython or C++ (eg
> by searching for wxTreeCtrl). The wxWiki sometimes also has info.

Thanks for the links. But after a quick search, I haven't found a
place where cross-platforms subtleties are documented. I will try a
deeper search.

> Happy to apply patches that note these differences in our ruby docs.

I'm glad to add another little contribution to wxRuby.
What do you think about having a general section on cross-platforms
issues, or having such a section in each Control (when it is relevant)
?

> > On Windows, you will see traces indicating that there are selection
> > change events occuring during the close of the application ! On Linux,
> > you don't have these events.
> This might possibly be something fixable in wxRuby, but I'm not sure.
> There's a few places I've been surprised by ObjectPreviouslyDeleted
> errors where events are getting sent to destroyed objects. I wonder if
> wxRuby should try to explicitly disconnect event handlers on window
> deletion - but there's nothing in the C++ docs that suggests this.

This is exactly the problem I had. In the code of selection change
event, I take and put the content of the textctrl (in the right pane)
based on the selected item. But during the close of the window, the
textctrl has been already destroyed. So I received this
ObjectPreviouslyDeleted error.

It would be really great if wxRuby can deal with this issue.
Indeed, unlike the 2 other issues, this one makes the application crash.

Cheers.

Chauk-Mean.


More information about the wxruby-users mailing list