Environment: iPhone (but Cocoa as well)...     I was using the App Delegate
as the link amongst view controllers in sharing data.   The 'App Delegate',
being persistent,
was my 'global data' clearing house.

     But now I learned that this is frown upon.   The preferred way is using
delegation to share data.

>From what I've read, delegation is essentially shared procedures via an
informal protocol; albeit the preferred design is to use
the formal protocol with @optional & @required directives.

I think I understand the basics.

But I wonder, how is data actually SHARED between a view controller and its
delegate?

The view controller has an ivar of type 'id' for the delegate, which has
methods declared within the protocol.

Here's some elementary questions:
1) How is the delegate actually launched (with valued parameters)?
2) How does the calling controller receive data back from the delegate?

Regards,
Ric.
_______________________________________________

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 arch...@mail-archive.com

Reply via email to