for (int x = 0; x < openSlots; x++) {
NSLog(@"Loading slot %i.", (x+1));
[[valueEditorSlots objectAtIndex:x] setStringValue:[[valueSavesDictionary valueForKey:[NSString stringWithFormat:@"Value Slot %i", (x+1)]] stringValue]];
[[valueSlots objectAtIndex:x] setStringValue:[[valueSavesDictionary valueForKey:[NSString stringWithFormat:@"Value Slot %i", (x+1)]] stringValue]];
[[slotValues objectAtIndex:x] setIntValue:[[valueSavesDictionary valueForKey:[NSString stringWithFormat:@"Slot Value %i", (x+1)]] intValue]];
}
您好,我正在尝试从属性列表中读取一组字符串和数字。NSNMutableArray 包含所有变量名称(索引 0-8)。所以我遍历数组的每个成员(所有这些都是 UI 文本字段)并将字符串值设置为其对应的属性列表键(Value Slot #)。这行不通。我在调试器中收到以下错误消息:
-[__NSCFString stringValue]:无法识别的选择器发送到实例 0x100463110
谢谢