Do I need to use Distributed Objects or not?
Do I need to use Distributed Objects or not?
- Subject: Do I need to use Distributed Objects or not?
- From: Michael Becker <email@hidden>
- Date: Wed, 9 Feb 2005 13:05:58 +0100
Hi all!
I need to do several thread-worthy little tasks in my application, e.g.
loading data from a server or loading several images (much like
iPhoto's import). I think I know the basic idea of threading in Cocoa
but I was just wondering what exactly I need. I do not want to do it
more complicated than necessary. Here are the general features I need:
1) the main thread needs to be informed when the detached thread has
finished
2) the user should be able to cancel the detached thread (that's not a
big problem, I just use a BOOL flag, right?)
3) the GUI has a progress indicator which should be in sync with
whatever the detached thread does.
I've read in the docs that GUI stuff should always be done from the
main thread, so how do I go about the 3rd feature? Can I make the
controller object a delegate of the threaded object? Do I eventually
need Distributed Objects here or can all this be done in a lighter way?
As my mechanism should work like iPhoto's image import, I will also
need to update an NSImageView with the image that is currently being
imported... so it all boils down to the question: DO or not DO?
Regards,
Michael
_______________________________________________
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