I just started using NSProgress. I’m going to use it as the mechanism for my 
framework to report the progress of a complex upload/download operation which 
can involve many files and other HTTP resources: the object representing this 
operation will have a public “progress” property exposing an NSProgress that 
the app can observe.

I like the way NSProgress is hierarchical, so a top-level instance can have 
child instances for sub-tasks. I’m making use of this to aggregate the progress 
of multiple download operations into one progress value. But I can’t find any 
public API for getting the nested NSProgress instances, i.e. something like 
“@property (readonly) NSArray* children". Huh? Did I miss something, or is this 
just some inexplicable hole in the API?

(I can tell each NSProgress _knows_ what its children are — it lists them in 
the output of its -description method, in a very nice tree display.)

Assuming this isn’t possible, are there any best practices for working around 
this? I’m considering defining a custom userInfo property, in which I can store 
an NSArray of the children.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to