Exception thrown in NSOrderedSet generated accessors

后端 未结 25 2312
天涯浪人
天涯浪人 2020-11-22 09:07

On my Lion app, I have this data model:

\"enter

The relationship subitem

相关标签:
25条回答
  • 2020-11-22 09:42

    I have the same situation with an item called "signals" instead of "subitems". The solution with tempset works in my testing. Further, I had a problem with the removeSignals: method. This override seems to work:

    - (void)removeSignals:(NSOrderedSet *)values {
        NSMutableOrderedSet* tempset = [NSMutableOrderedSet orderedSetWithOrderedSet:self.signals];
        for (Signal* aSignal in values) {
            [tempset removeObject:aSignal];
        }
        self.signals = tempset;
    }
    

    If there is a better way to do this, please let me know. My values input is never more than 10 -20 items so performance isn't much of a concern - nonetheless please point out anything relevant.

    Thanks,

    Damien

    0 讨论(0)
提交回复
热议问题