Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
- Subject: Re: Learning Cocoa/ObjectiveC and wondering why I had to do this.
- From: j o a r <email@hidden>
- Date: Mon, 7 Mar 2005 00:09:28 +0100
On 2005-03-06, at 23.20, Tom Boucher wrote:
Can you translate this for me?
NSString *result = [NSString stringWithFormat:@"%@ has %u
letters.",string,letterCount];
You're calling the "stringWithFormat:" method on "NSString", ie. the
class object for the NSString class. The reason that the class object
is the receiver, is because this is a class method, and not an instance
method. Read the ObjC PDF for more info.
j o a r
_______________________________________________
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