Wx::StatusBar set_status_widths returns argument error

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

Hi

Zhimin Z. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs