Hi,
Kushagra Merchant wrote:
>Hi,
> While running the sample application controls/control.rbw I
>encountered the following
>error:
> controls.rbw:1064:in `onAbout'': undefined method
`free'' for
>#<Wx::BusyCursor:0x2
>827db0> (NoMethodError)
> from controls.rbw:1039:in `initialize''
> from controls.rbw:1039:in `call''
> from controls.rbw:1164:in `main_loop''
> from controls.rbw:1164
>
>I''m running wxruby 0.6 on Windows XP. Is an explicit free call
required
>for BusyCursor?
>
>
The BusyCursor syntax has changed in 0.6.0 ... you no longer need the
free call. All you need to do is pass a block.
So if you did this earlier:
def onAbout(event)
bc = BusyCursor.new
dialog = MessageDialog.new(self, "This is a control sample",
"About Controls", OK )
dialog.show_modal()
bc.free
end
now you will have to do:
def onAbout(event)
BusyCursor.new {
dialog = MessageDialog.new(self, "This is a control
sample",
"About Controls", OK )
dialog.show_modal()
}
end
HTH,
-- Shashank
>Regards,
>Kushagra
>_______________________________________________
>wxruby-users mailing list
>wxruby-users@rubyforge.org
>http://rubyforge.org/mailman/listinfo/wxruby-users
>
>
>