D:/Aptana Projects/RubyPIM/MainWindow.rb:13:in on_init': undefined methodset_menu_bar’ for true:TrueClass (NoMethodError)
from D:/Aptana Projects/RubyPIM/MainWindow.rb:18:in main_loop' from D:/Aptana Projects/RubyPIM/MainWindow.rb:18:in’
Am Wed, 25 Jul 2012 18:04:24 +0200
schrieb Rubyist R. [email protected]:
@menubar = MenuBar.new
D:/Aptana Projects/RubyPIM/MainWindow.rb:13:in on_init': undefined method set_menu_bar’ for true:TrueClass (NoMethodError)
from D:/Aptana Projects/RubyPIM/MainWindow.rb:18:in main_loop' from D:/Aptana Projects/RubyPIM/MainWindow.rb:18:in ’
If you’re just starting out with wxRuby, why do you use MDI windows?
These are quite complex windows, and for the beginning you’re far
better off using ordinary frames.
In your above code, @frame is set to `true’, which is the return value
of show. true doesn’t have a method #set_menu_bar, hence the exception.
As said, for a minimal app you don’t want MDI windows. Try something
like this: