Re: Updating progress bar from multiple nested functions - best way?
Re: Updating progress bar from multiple nested functions - best way?
- Subject: Re: Updating progress bar from multiple nested functions - best way?
- From: John Brownlow <email@hidden>
- Date: Tue, 19 Apr 2005 16:35:59 -0400
Yes, I think that that may turn out to be the cleanest way of doing it.
I think I might abstract the process a little more and have something
like a 'progress window manager' which can deal with all of this quite
generally and receive notifications etc, absolving the controller
objects of the responsibility.
The preflight step is, I think, to calculate the # of paragraphs in the
document since that the paragraph is the iterative unit.
thanks
On Apr 19, 2005, at 4:27 PM, Adam Swift wrote:
On Apr 18, 2005, at 6:15 AM, j o a r wrote:
On 2005-04-18, at 14.45, Johnny Deadman wrote:
I want to put up a progress indicator BUT the process is split up
between many independent objects which don't know about each other
and don't know whether the job they're doing (eg formatting a
paragraph, analysing a scene) is a one-shot or part of a bigger
picture.
If you want to have a determinate progress indicator you need to know
the scope of the operation in advance. It doesn't sound like you have
this information in your current implementation. You would probably
need to add some sort of pre-flight step, where you compute how many
separate steps are involved in the operation, and perhaps also their
relative "weight".
Another way to solve this that avoids ugly object inter-references is
to use notifications from all of the object participating in the
auto-format process. Based on your description of the steps and
participants involved you could do something like:
--
John Brownlow
Deep Fried Films, Inc
http://www.johnbrownlow.com
http://www.pinkheadedbug.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden