• 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
Re: Newb Question re Messaging and Return Values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newb Question re Messaging and Return Values


  • Subject: Re: Newb Question re Messaging and Return Values
  • From: Kevin Elliott <email@hidden>
  • Date: Fri, 25 Jul 2008 16:13:10 -0700


On Jul 24, 2008, at 4:04 PM, Brad Gibbs wrote:

Looking at my problem further, I'm thinking I should make webServer a delegate of each of the devices. That would allow me to encapsulate the HTTP Posts and Gets for all of the devices in a single class. A device's methods could invoke the webServer delegate when they need to send information to the server or get information back. The webServer delegate would return the response to the device method that called the webServer method and that method could parse the response and update the UI directly or through an NSNotification.

Does this sound right?

Depends on what exactly you mean. If your planning to have lot of device and one webServer, then I'd say no. Delegate work well with a one to one relationship, not necessarily a one to many relationship. What's the purpose of the webServer vs. device objects? Why do you need a webServer object instead of just doing the work in the device objects (this is not necessarily a criticism, just clarifying roles)?
_______________________________________________


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


References: 
 >Newb Question re Messaging and Return Values (From: Brad Gibbs <email@hidden>)
 >Re: Newb Question re Messaging and Return Values (From: Brad Gibbs <email@hidden>)

  • Prev by Date: Re: defer loading window using bundles in XCode 3 Leopard
  • Next by Date: Re: defer loading window using bundles in XCode 3 Leopard
  • Previous by thread: Re: Newb Question re Messaging and Return Values
  • Next by thread: Core Data Backup on App Start
  • Index(es):
    • Date
    • Thread