Hi all and thanks to everyone working on this project =o)
I have a problem, and I suspect it has its origins in WxRuby…
In my program I use a GenericDirCtrl and handle its corresponding
TreeCtrl item selection event with evt_tree_sel_changed.
In the method handling this event, I try to get at the data of the
selected item, but I run into this:
./my_xrcise_frames.rb:43: [BUG] Bus Error
ruby 1.8.6 (2008-03-03) [universal-darwin9.0]
The code for the event handling method is as follows, where
gdc_browse_tree is the GenericDirCtrl instance:
item_id = tree_event.get_item
raise ‘item_id was zero’ if item_id == 0
tc = gdc_browse_tree.get_tree_ctrl
item_data = tc.get_item_data(item_id)
raise ‘item_data was nil’ if item_data == nil
The line number referenced in the crash bus error (43) is the
“item_data == nil” comparison. The exception doesn’t get raised - the
application just crashes. I tried to reproduce it by catching the same
event by modifying the treectrl.rb sample, so I could send you code
you were already very familiar with, but the error didn’t appear then.
It seems to require a GenericDirCtrl.
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
Any help is greatly appreciated! If I have omitted any important
information from this mail, tell me and I will do my best to provide
it. I have used wxruby with great results on linux, and I hope to be
doing the same on OSX in the future.