• 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
Asyncronous message handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Asyncronous message handling


  • Subject: Asyncronous message handling
  • From: "Mohan Parthasarathy" <email@hidden>
  • Date: Tue, 6 Jan 2009 10:14:00 -0800

Hi,
I am new to cocoa and hence i have this basic question for which i could not
find a good answer after researching on this topic.

Let us say that there are two objects A and B.

1) Object A produces some data
2) Object B consumes the data produced by object A

When object B sends a message to object A for fetching the data, the data is
not available immediately. When the data arrives later, it needs to notify
object B.

For example, object A fetches data from some web service and Object B is
some sort of a "controller". How does one handle this in Cocoa ?

- I can include the functionality of Object A within Object B itself and
hence there is no issue. But i guess this is prohibited as per the MVC
design.
- Object A can retain object B and later send the message back when data is
available. But then this creates a dependency of  object B knowing object A
and object A knowing object B. Is this okay ?
- Any other way ?

Any help on this would be appreciated.

Thanks
mohan
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Asyncronous message handling
      • From: Keary Suska <email@hidden>
  • Prev by Date: Python-Cocoa Development
  • Next by Date: Re: Cocoa-dev Digest, Vol 6, Issue 9
  • Previous by thread: Re: Python-Cocoa Development
  • Next by thread: Re: Asyncronous message handling
  • Index(es):
    • Date
    • Thread