Re: Newbie: How to understand Xcode's documentation
Re: Newbie: How to understand Xcode's documentation
- Subject: Re: Newbie: How to understand Xcode's documentation
- From: "Dave DeLong" <email@hidden>
- Date: Tue, 15 Jul 2008 16:28:22 -0600
Hi Phil,
You're right: the documentation can take some getting used to.
Here are some tips:
When you see a method declared with a "-" out in front, such as:
- (NSString *) substringWithRange:(NSRange)range;
That means that you can only use that method on an instance of the
class. For example:
NSString * someString = [myTextField stringValue];
NSString * subString = [someString substringWithRange:NSMakeRange(0,4)];
Methods that begin with a "+" are class methods and are used as such:
NSString * someString = [NSString stringWithString:someOtherString];
(Notice that I'm calling stringWithString on NSString itself and NOT
an instance of NSString)
There are a ton of resources out there for familiarizing yourself with
Objective-C and Xcode and whatnot. Our local CocoaHeads group just
had a meeting last week about Objective-C and transitioning to it from
other languages, and we've got a screencast of it at our site:
http://cocoaheads.byu.edu/videos
HTH,
Dave
_______________________________________________
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