0

我正在为 3 个 objChordFun(核心数据对象)属性赋值。问题是度数属性。它的内容正在循环内的某个地方发布。怎么了?我会很感激一些帮助。

    for (TonalScale *tonalScale in [TonalScale all]) {  
        NSOrderedSet *tsScales = [NSOrderedSet orderedSetWithOrderedSet:tonalScale.scale];  
        Scale *tsScale = [tsScales objectAtIndex:0];  
        NSOrderedSet *degrees = tsScale.degree;  
        for (int i=0; i<[tsScale.degree count]; i++) {  
            Degree *degree = [degrees objectAtIndex:i];  
            Scale *scale = [tsScales objectAtIndex:i];  
            NSSet *chords = [NSSet setWithSet:scale.chord];  
            for (Chord *chord in chords) {  
                for (Tonality *tlt in [Tonality all]) {  
                    objChordFun = [ChordFunction create];  
                    objChordFun.degree = degree;  
                    objChordFun.chord = chord;  
                    objChordFun.tonality = tlt;  
                }  
            }  
        }  
    }  
4

0 回答 0