Re: Newbie question on Methods
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