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

Mario Steele mario at ruby-im.net
Wed Jan 14 18:12:56 EST 2009


Here is your problem

@frame = Frame.new(nil, -1, "Ruby Mud Client", DEFAULT_POSITION,
Point.new(300, 875))

^^^^^^^^^^^^^^^^^^^

That actually needs to be Size.new(300,875), or you can just pass [300,875],
and that will work as well.


On Wed, Jan 14, 2009 at 4:53 PM, Tim Mcd <lists at ruby-forum.com> wrote:

> /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/.
> _______________________________________________
> 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/20090114/0d430b32/attachment.html>


More information about the wxruby-users mailing list