• 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: Newbie question on Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question on Methods


  • Subject: Re: Newbie question on Methods
  • From: Cameron Hayne <email@hidden>
  • Date: Sun, 12 Mar 2006 11:48:19 -0500

On 12-Mar-06, at 11:10 AM, Bobby B wrote:

NSArray *fileTypes = [NSArray arrayWithObject:@"td"];
NSOpenPanel *oPanel = [NSOpenPanel openPanel];

I understand that in the first line you are declaring an instance of
the class (fileTypes) of the NSArray object.  But I don't understand
the part that follows it.  Why do you send the message to the NSArray
instead of to the fileTypes class?

1) 'fileTypes' is an object, not a class 2) the 'arrayWithObject' method is a class method

You should read the introductory Cocoa documentation that was just recently published by Apple:
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaFundamentals/index.html


And for info about specific methods, I recommend using AppKiDo: http://homepage.mac.com/aglee/downloads/

--
Cameron Hayne
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Newbie question on Methods (From: "Bobby B" <email@hidden>)

  • Prev by Date: Re: Advice On Where To Start
  • Next by Date: Re: transparent overlay NSWindow
  • Previous by thread: Newbie question on Methods
  • Next by thread: Re: Newbie question on Methods
  • Index(es):
    • Date
    • Thread