• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Do I need to use Distributed Objects or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Do I need to use Distributed Objects or not?
      • From: Tim Hart <email@hidden>
    • Re: Do I need to use Distributed Objects or not?
      • From: Chaz McGarvey <email@hidden>
    • Re: Do I need to use Distributed Objects or not?
      • From: Dave Camp <email@hidden>
  • Prev by Date: Re: WTF, my application is writing *directly* into Xcode log?
  • Next by Date: Re: Serious crash from setNeedsDisplayInRect:
  • Previous by thread: Re: Statically linking *Obj-C* lib
  • Next by thread: Re: Do I need to use Distributed Objects or not?
  • Index(es):
    • Date
    • Thread