I am just starting to play with wxRuby, using the samples which come with it. However, I can't seem to add a menu item. I have tried a bunch of things, but here is what I want to do:
class MinimalFrame < Frame
def initialize(title)
...
menu_file.append(Something, "&Something\tAlt-W", "Do something")
menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program")
menu_bar.append(menu_file, "&File")
...
evt_menu Wx::ID_EXIT, :on_quit
evt_menu Something, :on_quit
Looking through the other samples, I don't see anything I am missing, but it refuses to work. It works when I replace Something
with Wx::ID_ANY
. I tried it with class MinimalFrame < Wx::Frame
also. I have googled but I haven't found my answer yet, so I thought I'd come here.
Also, I feel silly for asking, but what does the <
mean in the class def? I haven't come across it in any of the other stuff I have been working on yet.
Thanks!