Hi, I added the following line in samples/wxStatusBar.rbw set_status_widths(1, 100) # Doc: set_status_widths(Integer n, Integer widths) Got error: wxStatusBar.rbw:17:in `set_status_widths'': wrong # of arguments(2 for 1) (ArgumentError) wxRuby version: wxruby-1.9.6-x86-mingw32. Thanks in advance. Regards, Zhimin -- Posted via http://www.ruby-forum.com/.
Alex Fenton
2008-Aug-05 11:16 UTC
[wxruby-users] Wx::StatusBar set_status_widths returns argument error
Hi Zhimin Zhan wrote:> I added the following line in samples/wxStatusBar.rbw > set_status_widths(1, 100) # Doc: set_status_widths(Integer n, Integer > widths) > > Got error: > wxStatusBar.rbw:17:in `set_status_widths'': wrong # of arguments(2 for > 1) (ArgumentError) >It''s a mistake in the documentation (which was originally automatically converted from C++). Thanks for reporting this so we can correct it. The propoer argument should simply be an array of widths. Eg, if you wanted two fields of 150px and 250px, call it like this: set_status_widths [150, 250] OR self.status_widths = [150, 250] a
Apparently Analagous Threads
- [1016] trunk/wxruby2/swig/classes/StatusBar.i: Remove directors from StatusBar''s methods as don''t seem to need them, (Bug:6809)
- wxRuby and XRC via wxGlade
- App freezes on wxruby-19-2.0.1 on Windows, fine on Mac
- drag_accept_files undefined in 1.9.8 (mingw32)
- wxWebConnect - Web Browser Control Library for wxWidgets