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

only defined for abstract class


  • Subject: only defined for abstract class
  • From: Francis Derive <email@hidden>
  • Date: Tue, 4 Oct 2005 21:04:06 +0200

Bonjour,



 NSMutableArray *myArray1 = [[NSMutableArray alloc] init];
 SousClasse *myArray2 = [[SousClasse alloc] init];

 [myArray1 addObject:@"un"];
 NSLog(@"myArray1 a %d objet(s)", [myArray1 count]);

 [myArray2 addObject:@"deux"];
 NSLog(@"myArray2 a %d objets", [myArray2 count]);

[Session started at 2005-10-04 20:49:45 +0200.]
2005-10-04 20:49:45.661 Test[1333] myArray1 a 1 objet(s)
2005-10-04 20:49:45.668 Test[1333] *** Uncaught exception: <NSInvalidArgumentException> *** -addObject: only defined for abstract class. Define -[SousClasse addObject:]!





How do you understand that ? Can't "addObject:" be found in the super class of "SousClasse" - that is NSMutableArray ?


@interface SousClasse : NSMutableArray {
    Class laClasse;
}
- (id) init;
- (id) initWithClass:(Class) aClass;
@end


Thanks a lot.

Francis.

_______________________________________________
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


  • Follow-Ups:
    • Re: only defined for abstract class
      • From: Pontus Ilbring <email@hidden>
  • Prev by Date: Re: SenTestingKit and debugging UnitTests
  • Next by Date: Re: only defined for abstract class
  • Previous by thread: NSSelector, java and Class
  • Next by thread: Re: only defined for abstract class
  • Index(es):
    • Date
    • Thread