Re: What init declaration class needs?
Re: What init declaration class needs?
- Subject: Re: What init declaration class needs?
- From: Stefan Pantke <email@hidden>
- Date: Fri, 13 Feb 2004 16:13:31 +0100
Robert,
hard to say, what's the problem.
Hopefully, you do not call
[< listCollection instance ref> count];
since this will fail.
You should provide some listCollection method like this:
- (int) count
{
return [list count];
}
Moreover, for debugging purpose, you might implement this:
- (NSString*) description
{
return [NSString stringWithFormat:@"<listCollection>: %@", [list
description]];
}
Please don't confuse you new class with it's private variables.
- stefan
Am 13.02.2004 um 14:30 schrieb Roberto Sobachi:
- (listCollection *) init
{
[super init];
list = [[NSMutableArray alloc] init];
return self;
}
What does it need?
If I try to know the count of the Array from another class, I can't, it
returns 0, also if I add objects to it.
Why?
Roberto Sobachi
developer
http://www.xidiar.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.