On Oct 21, 2009, at 12:23 PM, Joshua Garnham wrote:

How would I send a Selector to another class?
I know to send it to a selector in the same file you do
[self performSelector:@selector(doSomething)];

and for sending it to another class I've tried
[otherClass performSelector:@selector(doSomethingElse)];

But I just get an error in the Debugger saying
+[otherClass doSomethingElse]: unrecognized selector sent to class 0xe5c4

What have I done wrong?

You seem to be missing the very basics of Objective-C (and I'd dare to say object-oriented programming topics in general). You should (re) read the introductory material in the documentation and take advantage of places like cocoadevcentral.com (free articles) to get a handle on this.

The Objective-C Programming Language
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html

Cocoa Application Tutorial
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjCTutorial/01Introduction/01Introduction.html

CocoaDev Central
http://www.cocoadevcentral.com

--
I.S.


_______________________________________________

Cocoa-dev mailing list ([email protected])

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]

Reply via email to