I''ve been doing some development with TreeCtrl, and am having a few
problems with TreeItemId. Specifically, I''m getting ''null
reference''
errors after a time - which I think means that the wrapper is tracking
objects, but the underlying C++ object is deleted.
Rather than trying to fix this. I''m wondering if it''s easier
to do away
with the wxTreeItemId class, and just use typemaps to convert these to
ruby Integers (as in 0.6.0). The following seems to work for me:
%typemap(in) wxTreeItemId& "$1 = new
wxTreeItemId(NUM2INT($input));"
%typemap(directorin) wxTreeItemId& "$input = LONG2NUM( (long)$1.m_pItem
);"
%typemap(out) wxTreeItemId "$result = LONG2NUM( (long)$1.m_pItem );"
I''m not sure the overhead of directors etc is needed for TreeItemId -
the only method that wxTreeItemId offers over Integer is is_ok, which
can be done with zero?
Let me know if we should keep this class.
happy new year - think Sean''s right that this could be a break through
for wxruby - planning to put some ideas for a "roadmap" on the wiki...
cheers
alex