[wxruby-users] displaying a progress dialog
Alex Fenton
alex at pressure.to
Tue Jan 13 13:23:25 EST 2009
John Griffiths wrote:
> Hi, trying to display a progress dialog tied to a Frame using via...
>
> dlg = Wx::ProgressDialog.new("title", "task", max, self,
> Wx::PD_CAN_ABORT | Wx::PD_APP_MODAL)
>
> max and self both have valid values but everytime i try to use this i
> get...
>
> progress.rb:233:in `refresh': wrong # of arguments(2 for 0)
> (ArgumentError)
Works fine for me with wxRuby 1.9.9 on Windows, and I've been using
ProgressDialog on OS X recently and not had any problems.
Are you in fact writing your own ProgressDialog subclass, and defining a
method called 'refresh' in it? wxRuby calls 'refresh' upon Windows (with
two arguments) when they need to be redrawn. This allows for custom
handling in Ruby, but it will cause problems if you have a method with
the same name that does something different.
a
More information about the wxruby-users
mailing list