I’m currently writing a simple outliner application as a tutorial on
wxRuby (both will be soon released )
I tested this application on Windows and Linux and found that the tree
event behavior :
- is sometime strange on each platform
- is also different on each platform
Even if I managed to take care of these differences in the
application, I’m just wondering if :
- they revealed some wxRuby issues ? wxWindows issues ?
- or it is normal ? In this case, I’d really appreciate some
links/documentation on these cross-platforms issues.
You will find attached the source codes and captures of the
application on Windows and Linux (Fedora 8).
So the symptoms :
1/ Run outliner_wo_check.rb
Clicking on the ‘Add Root’ button, creates an item and allow the
edition of its label.
On Windows, this works as expected. You can click several times and
everything is fine.
On Linux, this does not work. Sometimes, the editing of the label is
not ended by the selection (through code) of another item. See the
To fix this Linux issue, I added some checks to know if a label is
being edited and to ensure that the editing is ended before adding
2/ Run outliner.rb
If I create a root article, there are 2 selection change events on
Windows (strange) and only one on Linux (as expected).
See outliner_linux.jpg and outliner_windows.jpg.
3/ Run again outliner.rb :
- create two root articles, create a child within the first root as
shown in outliner_windows.jpg
- close the application afterwards
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 time for 2/ and 3/ I had to write code to face these strange
things on Windows.
Thanks in advance for any help/clarification.