calling a function in one class from another
calling a function in one class from another
- Subject: calling a function in one class from another
- From: Geoffrey Holden <email@hidden>
- Date: Thu, 5 Aug 2010 15:42:51 +0100
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'?
Why do I want to do this? Well, 'Bar' contains all the code necessary to
control a view. This view contains an NSTableView for an address book.
'Foo' loads the address book data from a remote server. 'Foo' also loads
another class 'Baz' which has an editor view. I want 'Bar' to be able to
execute the address book loader code in 'Foo' and I want to be able to
double click on an address in 'Bar' and have it execute code in 'Foo' which
will then appropriately load the editor view in 'Baz'.
I'm sure I've seen this done, and I'm fairly certain that it's easy to do -
but I can't for the life of me remember how or where!
I hope that this makes sense.
Regards,
Geoffrey.
_______________________________________________
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