[wxruby-users] Wx::Font.new fails in a Runtime Error

Andreas Garnæs lists at ruby-forum.com
Mon Oct 13 10:17:21 EDT 2008


Кирилл Лиходедов wrote:
> Oops, sorry, that should be 
> text.set_default_style(Wx::TextAttr.new(Wx::BLACK,
> Wx::WHITE, font))
> 
> OK, I understand, it works now, thanks for the hint!
> 
> But the main problem still exists: it is very hard to determine when you 
> use
> wrong or incomplete method signature, when it just silently fails.Is it 
> some
> configuration problem of mine or it is WxRuby feature?
> 
> 2008/10/13 Кирилл Лиходедов <kirill.likhodedov at gmail.com>

I guess you just have to read the documentation very carefully. I get 
significantly better error messages on Ubuntu, however, eg:

> Wx::Font.new(20)
ArgumentError: Wrong arguments for overloaded method 'wxFont.new'.
Possible C/C++ prototypes are:
    wxFont.new()
    wxFont.new(int pointSize, int family, int style, int weight, bool 
const underline, wxString const &faceName, wxFontEncoding encoding)
-- 
Posted via http://www.ruby-forum.com/.


More information about the wxruby-users mailing list