[wxruby-users] displaying a progress dialog
Mario Steele
mario at ruby-im.net
Wed Jan 14 02:20:39 EST 2009
A refresh can't always be truely tested, cause it falls in the domain of the
native OS, and under several different conditions in which a refresh will
occur.
Mainly, a refresh will occur for part of a window, when the OS Detects that
another window has covered up the window, and needs to repaint the region.
A full refresh will also occur, if you minimize your app, and then restore
it, as well as Maximizing and Restoring.
Refreshes of controls occur on a control by control basis, meaning that if
Control X is updated, but Control Y isn't, Control X will get a refresh,
while Control Y won't.
So, as you can see, there are many variables in which a refresh can occur,
but it's not always the same, and it's never a "timed" matter. It's an
On-Demand deal.
hth,
Mario
On Tue, Jan 13, 2009 at 4:25 PM, Timothy McDowell <tmcdowell at gmail.com>wrote:
> Excuse me for interrupting this, but how often is 'refresh' on a window
> called, and what are it's two arguments?
>
>
> On Tue, Jan 13, 2009 at 11:23 AM, Alex Fenton <alex at pressure.to> wrote:
>
>> 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
>> _______________________________________________
>> wxruby-users mailing list
>> wxruby-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/wxruby-users
>>
>
>
>
> --
> --Brains.
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090114/27536ff3/attachment.html>
More information about the wxruby-users
mailing list