• 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
count only defined for abstract class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

count only defined for abstract class


  • Subject: count only defined for abstract class
  • From: Ted Lowery <email@hidden>
  • Date: Sun, 12 Jan 2003 09:22:26 -0500

Hi all, I have another question:

I have a subclass of NSMutableArray. when I send the message [array
count], I get an error *** -count only defined for abstract class.
Define -[QDObjectSelection count]!

I tried adding

- (unsigned)count {
return [super count];
}

to my subclass, but of course that produces the same result. I also
tried accessing the member directly, but it is not exposed.

I also tried:

- (unsigned)count { debug;
NSArray* array = self;
return [array count];
}

and

- (unsigned)count { debug;
return [(NSArray*)self count];
}

However these produce an infinite loop, which is really strange (to me)
as I would think the above should force the message to call the NSArray
version of count.

Anyone know what is going on here?

Cheers, Ted
_______________________________________________
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.

  • Prev by Date: NSTextView
  • Next by Date: Re: Aqua Human Interface and Safari
  • Previous by thread: Re: NSTextView
  • Next by thread: Re: count only defined for abstract class
  • Index(es):
    • Date
    • Thread