KONTRA Gergely wrote:> Is it possible to somehow eliminate the use of the self.get_id''s
in most
> situations?
> When you set up an event, you always must type sg. like
> evt_tree_key_down(self.get_id) {|e|
>
> where self.get_id can be the default or something...
Hi,
Good suggestion. Currently, there is no way to avoid passing an id to
that kind of evt_xxx method. I agree that it would be nice to have some
defaults.
You should probably be allowed to pass an id *OR* a valid wxRuby object
(we can call get_id automatically), *OR* nothing, in which case it would
default to self.get_id.
That is exactly the kind of API improvement I would like to start adding
to wxRuby after it is stable. Now, if I can just figure out how to
rearrange my life so I can have enough time to work on wxRuby :-(
For now, you could work around it by defining your own methods in the
TreeCtrl class. You would have to name them differently, but they could
delegate the call to the existing (real) method, with self.get_id as the
parameter.
On a positive note, I am more optimistic about the memory management
stuff. Lyle (the FXRuby maintainer) answered some of my questions, and I
think wxRuby 0.3 may fix most of the memory leaks.
Cheers,
Kevin