Hi, System Browser Category Pane>>find class ... ComplexProgressIndicator Class Pane>>class refs(N)
and ProgressNotification , Class Pane>>class refs(N)
Bettine
_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
On Saturday 30 March 2002 01:35 pm, Mayuresh Kathe wrote:
How do I use the ProgressIndicator?
In 3.2 I see the ComplexProgressIndicator.
Browsing for class references, I see (among others) a number of refs in Project.
Looking at one of them, I see:
storeOnServerWithProgressInfo ComplexProgressIndicator new targetMorph: nil; historyCategory: 'project storing'; withProgressDo: [self storeOnServerInnards]
Apparently, a block is being executed.
OK, let's look at storeOnServerInnards.
Hmm... we see that it signals ProgressNotification signals periodically:
ProgressNotification signal: '2:versionsDetected'.
OK, let's look at withProgressDo:. First, note that it only works in Morphic. If you don't mind that, then we see that it uses the note string in the exception to update its display.
So the answer (if you're using Morphic) is: pass withProgressDo: a block that will signal ProgressNotifications.
If you're using MVC, look at String>>displayProgressAt:from:to:during: I found this by looking through the Project loading code, and eventually found PositionableStream>>fileInAnnouncing: which calls it (this is the familiar progress bar that pops up during change set loading).
'Now here''s some Real Progress' displayProgressAt: Sensor cursorPoint from: 0 to: 10 during: [:bar | 1 to: 10 do: [:x | bar value: x. (Delay forMilliseconds: 500) wait]].
Whoa Morphic ;)
But, I saw a Progress Indicator being shown even in MVC, hows that?
~Mayuresh
From: Ned Konz ned@bike-nomad.com
First, note that it only works in Morphic. If you don't mind that, then we see that it uses the note string in the exception to update its display.
On Saturday 30 March 2002 02:52 pm, Mayuresh Kathe wrote:
But, I saw a Progress Indicator being shown even in MVC, hows that?
Read my message further where it says "If you're using MVC,"...
squeak-dev@lists.squeakfoundation.org