Re: Sending a Selector to another Class.
Re: Sending a Selector to another Class.
- Subject: Re: Sending a Selector to another Class.
- From: "I. Savant" <email@hidden>
- Date: Wed, 21 Oct 2009 12:29:52 -0400
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@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