ListCtrl unexpected behavior

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.

one more detail:

the error occurs only alternating mouse clicks and keyboard arrow keys
through the list.

Hi Fabio

Fabio P. wrote:

wxruby-1.9.9-x86-mswin32-60, ruby 1.8.6
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
WinXP sp2

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. 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 F. [email protected]:

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