On 29 Oct 2008, at 06:30, Charles Steinman wrote:
From: Albert Jordan <[EMAIL PROTECTED]>
What is the recommended way for Object B to inform Object A that it
is
done processing a request for the following scenario?
Object A has a list of phone numbers to send SMS messages
Object B implements sending an SMS message to a given phone number
I think a delegate is the usual Cocoa pattern for this kind of
situation. You could have Object B send Object A an -
objectB:didSendSMSMessage:toNumber: message or something along those
lines.
A delegate certainly seems to be the appropriate model here; delegates
work well when there is usually one, and never more than one, object
interested in the information. If you have a situation where there
might well me more than one or less than one interested object (e.g.
object B noticed that the phone that might send the message has been
disconnected) then posting a notification might be a better model; any
interested party can then subscribe to that notification.
Cheers,
Nicko
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]