On 06/08/2010, at 12:42 AM, Geoffrey Holden wrote:

> If I have a class 'Foo' (containing the function 'Wabble'), which loads
> another class 'Bar', is it possible a function within 'Bar' to execute the
> 'Wabble' function within the calling class 'Foo'?

Yes, within Bar, you just have [theFoo Wabble];

The real question is, how does Bar have a reference to <theFoo>? Maybe Bar 
could have an IBOutlet to theFoo and you link it up in IB. Otherwise you need 
to set it up somewhere in your code.

There are many ways to establish a relationship between two objects, but an 
instance variable (ivar) or an outlet (which is just the same thing, but 
visible to IB) is straightforward.

--Graham


_______________________________________________

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