only defined for abstract class
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