• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sending a Selector to another Class.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending a Selector to another Class.


  • Subject: Re: Sending a Selector to another Class.
  • From: Rob Keniger <email@hidden>
  • Date: Thu, 22 Oct 2009 16:12:38 +1000

On 22/10/2009, at 3:52 PM, Joshua Garnham wrote:

> Ah, I see. so I need to send it to an instance of the class not the class it self.
> How would I do that?


With respect, please understand that your questions are akin to this:

Q. How do I start the car?
A. You turn the key.
Q. How do I drive?
A. ummm....

You need to learn the basics of Objective-C, it is very clear that you do not understand even the simplest concepts.

To directly answer your question, you allocate and initialize an instance of your class using [[YourClass alloc] init], or using a convenience class method or other designated initializer. However, this information is unlikely to help you until you invest some time in learning Objective-C.

I personally recommend reading this book:

http://www.amazon.com/Programming-Objective-C-2-0-Stephen-Kochan/dp/0321566157

It's all laid down here though:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/index.html

--
Rob Keniger



_______________________________________________

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

  • Follow-Ups:
    • Re: Sending a Selector to another Class.
      • From: Paul M <email@hidden>
References: 
 >Sending a Selector to another Class. (From: Joshua Garnham <email@hidden>)
 >Re: Sending a Selector to another Class. (From: Jim Kang <email@hidden>)
 >Re: Sending a Selector to another Class. (From: Jens Alfke <email@hidden>)
 >Re: Sending a Selector to another Class. (From: Joshua Garnham <email@hidden>)

  • Prev by Date: "Sticky" Event tracking
  • Next by Date: Re: How to run a panel that customizes a new NSDocument
  • Previous by thread: Re: Sending a Selector to another Class.
  • Next by thread: Re: Sending a Selector to another Class.
  • Index(es):
    • Date
    • Thread