Hi, using ListCtrl, I realized that, capturing the selection event by using the macro evt_list_item_selected, I get mistaken event of type ListItem instead of type ListEvent. I noticed that this occurs when i use the keyboard arrow keys to move through the list. It can be shown in the example Bigdemo -> wxListCtrl_virtual causing the error. my environment is wxruby-1.9.9-x86-mswin32-60, ruby 1.8.6 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] WinXP sp2 if i rememer well there was no problem with wxruby-1.9.8 regards, bio. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
one more detail: the error occurs only alternating mouse clicks and keyboard arrow keys through the list. On Fri, Jan 9, 2009 at 3:30 PM, Fabio Petrucci <fabio.petrucci at gmail.com>wrote:> Hi, > > using ListCtrl, I realized that, capturing the selection event by using the > macro evt_list_item_selected, I get mistaken event of type ListItem instead > of type ListEvent. > I noticed that this occurs when i use the keyboard arrow keys to move > through the list. > > It can be shown in the example Bigdemo -> wxListCtrl_virtual causing the > error. > > my environment is > > wxruby-1.9.9-x86-mswin32-60, ruby 1.8.6 > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > WinXP sp2 > > if i rememer well there was no problem with wxruby-1.9.8 > > regards, > > bio. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090109/432ae9e2/attachment-0001.html>
Hi Fabio Fabio Petrucci wrote:> using ListCtrl, I realized that, capturing the selection event by > using the macro evt_list_item_selected, I get mistaken event of type > ListItem instead of type ListEvent. > I noticed that this occurs when i use the keyboard arrow keys to move > through the list. > > It can be shown in the example Bigdemo -> wxListCtrl_virtual causing > the error. > > my environment is > > wxruby-1.9.9-x86-mswin32-60, ruby 1.8.6 > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > WinXP sp2Thanks for the report. I think that at the root this is the same bug that others were encountering with Scintilla event handlers, which is now fixed in SVN. I will try and reproduce using the ListCtrl on Windows (the bug depends partly on how the OS allocates memory blocks). Useful to know that it wasn''t a problem in 1.9.8 - will check see if any other classes might have this problem. It will be fixed for 2.0 cheers alex
Hi, 2009/1/9 Alex Fenton <alex at pressure.to>:> Hi Fabio > > Fabio Petrucci wrote: >> >> using ListCtrl, I realized that, capturing the selection event by using >> the macro evt_list_item_selected, I get mistaken event of type ListItem >> instead of type ListEvent. >> I noticed that this occurs when i use the keyboard arrow keys to move >> through the list. >> >> It can be shown in the example Bigdemo -> wxListCtrl_virtual causing the >> error. > > Thanks for the report. I think that at the root this is the same bug that > others were encountering with Scintilla event handlers, which is now fixed > in SVN.FYI, it works fine for me with the latest revision in SVN. Cheers, Chauk-Mean.
Chauk-Mean P wrote:>> Thanks for the report. I think that at the root this is the same bug that >> others were encountering with Scintilla event handlers, which is now fixed >> in SVN. >> > > FYI, it works fine for me with the latest revision in SVN.Cool, thanks. I took another look at our SWIG wxRuby_WrapWxEventInRuby function and there''s something in there which could potentially still cause these errors where an event handler receives an odd type of object instead of the correct Event object. I''ll put a patch in to make it watertight, although it may well be that the commonest route for these memory mess-ups is already plugged. cheers alex