search for: rb_eindexerror

Displaying 3 results from an estimated 3 matches for "rb_eindexerror".

2007 Sep 05
0
[ wxruby-Bugs-13676 ] xrc listctrl windows custom data crash
...row < 0 || row >= self->GetItemCount() ) return Qnil; long item_data = self->GetItemData(row); if ( item_data == 0 ) return Qnil; return (VALUE)item_data; } VALUE set_item_data(int row, VALUE ruby_obj) { if ( row < 0 || row >= self->GetItemCount() ) { rb_raise(rb_eIndexError, "Uninitialized item"); } long item_data = (long) ruby_obj; bool result = self->SetItemData(row, item_data); if ( result ) return Qtrue; return Qnil; } ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.or...
2007 Sep 04
4
listctrl set_item_data
Hi, I have used set_item_data with ruby objects (an array) and got a crash. The reason is simple, the objects were deallocated by the GC. The easy solution would be to accept only long parameters (like the original interface). The hard is to play by the GC''s rules and increase the reference count and decrease on deletion. Regards, teki
2006 Nov 30
0
[765] trunk/wxruby2: Fixed item_data functions for ListCtrl, plus test
...nbsp&nbspif ( row < 0 || row >= self->GetItemCount() ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_raise(rb_eIndexError, "Uninitialized item"); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp } +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsplong item_data = (long) ruby_obj; +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspbool res...