Re: Object-C question #1
Re: Object-C question #1
- Subject: Re: Object-C question #1
- From: Thomas Davie <email@hidden>
- Date: Wed, 8 Dec 2004 04:16:52 +0000
On 8 Dec 2004, at 04:10, King Chung Huang wrote:
You probably intended to send the parseString: message to yourself. If
so, the initWithString: method should probably look something like
this:
- (id)initWithString:(NSString *)string {
if (self = [super init]) {
[self parseString:string];
}
return self;
}
Actually, your init method should look exactly like this. I've seen
quite a few variants on the init method... But this style is the only
one that captures the correct semantics that cocoa asks for.
Bob
--
What is the internet?
It's the largest equivalence class in the reflexive transitive
symmetric closure of the relationship "can be reached by an IP packet
from". -- Seth Breidbart
_______________________________________________
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