search for: getitemdata

Displaying 5 results from an estimated 5 matches for "getitemdata".

2006 Nov 30
0
[765] trunk/wxruby2: Fixed item_data functions for ListCtrl, plus test
...t; %ignore wxListCtrl::GetItemSpacing(bool isSmall) const; </span><span class="cx"> </span><ins>+// dealt with below </ins><span class="cx"> %ignore wxListCtrl::GetItem(wxListItem& info) const; </span><ins>+%ignore wxListCtrl::GetItemData; +%ignore wxListCtrl::SetItemData; </ins><span class="cx"> </span><span class="cx"> %extend wxListCtrl { </span><span class="cx"> VALUE get_item(int row, int col = -1) </span><span class="lines">@@ -36,10 +39...
2006 Dec 05
0
[779] trunk/wxruby2: Added TreeCtrl#traverse method and documentation
...;nbsp&nbsp&nbsp&nbsp -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp// check if there''s item data, and mark it -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwxRbTreeItemData* ruby_item_data = (wxRbTreeItemData *)tree_ctrl->GetItemData(base_id); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( ruby_item_data != NULL ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp { -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp...
2007 Sep 05
0
[ wxruby-Bugs-13676 ] xrc listctrl windows custom data crash
...accepted: @lst.set_item_data(x,[x,x]) I don''t know how it supposed to work, but it seems that the ruby object is converted to long and then back (ListCtrl.i): VALUE get_item_data(int row) { if ( 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...
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 16
0
[741] trunk/wxruby2: Fix get_item_data, hiding TreeItemData messiness, fix GC-ing (Alex Fenton)
...ment, which may be any normal Ruby +object. Alternatively, a Ruby object can be explicitly associated with a +TreeCtrl item by calling "set_item_data":#TreeCtrl_setitemdata . The +same Ruby object can later be retrieved from a TreeCtrlItemId by calling +"get_item_data":#TreeCtrl_getitemdata . + </ins><span class="cx"> h2. Win32 notes </span><span class="cx"> </span><span class="cx"> TreeCtrl class uses the standard common treeview control under Win32 </span><span class="lines">@@ -78,9 +102,8 @@ &...