[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issues subclassing NSMutableArray
From: |
Riccardo Mottola |
Subject: |
Issues subclassing NSMutableArray |
Date: |
Sun, 17 Nov 2019 16:08:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Hi!
I wanted to subclass NSMutableArray, so that I can easily add some extra
methods.
I declared my subclass like this:
@interface FileArray : NSMutableArray
{
}
However, when I run my app, I get this:
StepSync.app/StepSync: Uncaught exception NSInvalidArgumentException,
reason: [FileArray-addObject:] should be overridden by subclass
I did override all concrete methods in the easiest possible way, calling
super. For addObject I did:
- (void)addObject:(id)anObject
{
[super addObject:anObject];
}
why is this not enough or not working in any case?
Riccardo
- Issues subclassing NSMutableArray,
Riccardo Mottola <=