Hey Joseph,
The problem, is that GenericDirCtrl doesn''t forward events that are
used in
the TreeCtrl (Which is what GenericDirCtrl is), what you need to do, is
create an intermediate go between class, in order to get it, or do an
Instance Evaluation on the object. Since your using XRC, my suggestion
would be the latter. What you would do, is:
@dirtree.instance_eval do
# self is now @dirtree
evt_tree_item_selected(self) do |evt|
puts "Item has been selected, Item Text:
#{self.get_item_text(evt.get_item)}"
end
end
I''ve used this method, only using Inheriting from a GenericDirCtrl in
my own
custom class, for wxRIDE, to handle File System stuff.
Hope this helps.
On Fri, Jun 6, 2008 at 4:07 PM, Joseph Edelstein <lists at ruby-forum.com>
wrote:
> Joseph Edelstein wrote:
> > Joseph Edelstein wrote:
> >> I am having a problem getting any event to happen when I activate
a
> >> selection on GenericDirCtrl i.e. double click on it.
> >>
> >> Could anyone help me out.
> >>
> >> thanks in advance.
> >>
> >> Joe
>
>
> Attachments:
> http://www.ruby-forum.com/attachment/2125/random_frame.rb
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/wxruby-users/attachments/20080606/1562ce5f/attachment.html>