• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What init declaration class needs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >What init declaration class needs? (From: Roberto Sobachi <email@hidden>)

  • Prev by Date: Re: What init declaration class needs?
  • Next by Date: Re: What init declaration class needs?
  • Previous by thread: Re: What init declaration class needs?
  • Next by thread: Problems with 2 classes HELP
  • Index(es):
    • Date
    • Thread