[wxruby-users] Initializing a Frame seems to fail...

Tim Mcd lists at ruby-forum.com
Wed Jan 14 17:53:22 EST 2009


/usr/bin/ruby -w /Users/Tim/wxrmc.rb
/Users/Tim/wxrmc.rb:9:in `new': Error initializing #<Wx::Frame:0x74ecf8>
(ArgumentError)
 : Wrong arguments for overloaded method 'wxFrame.new'.
Possible C/C++ prototypes are:
    wxFrame.new()
    wxFrame.new(wxWindow *parent, wxWindowID id, wxString const &title,
wxPoint const &pos, wxSize const &size, long style, wxString const
&name)

Correct parameters for Wxruby2::Frame.new are:
:id => (Fixnum)
:title => (String)
:pos => (Wxruby2::Point)
:size => (Wxruby2::Size)
:style => (Fixnum)
:name => (String)
  from /Users/Tim/wxrmc.rb:9:in `on_init'
  from /Users/Tim/wxrmc.rb:21:in `main_loop'
  from /Users/Tim/wxrmc.rb:21

Compilation exited abnormally with code 1 at Wed Jan 14 15:46:45

Thats the error for this line:
    @frame = Frame.new(nil, -1, "Ruby Mud Client", DEFAULT_POSITION,
Point.new(300, 875))
of this code:

http://pastie.org/360951

Anyone know what it means by 'Wrong Arguments'? I'm fairly certain that
those arguments are correct...
-- 
Posted via http://www.ruby-forum.com/.


More information about the wxruby-users mailing list