I have an Object bound to the user interface with a NSObjectController. I am able to archive the Object and unarchive it later. This works fine so far. In the Debugger I can see the object holds the data I saved in a previous session. The remaining problem is: The user interface does not refresh. I guess I have to tell the NSObjectController somehow he has to deal with an other object. But I don't know how. I tried newObject but that did not work at all.
At the moment my code looks like this:
if ([aOpenPanel runModal] == NSOKButton)
{
NSString *filename = [aOpenPanel filename];
rpgCharacter = [NSKeyedUnarchiver unarchiveObjectWithFile:filename];
// [myCharacterController DoSomething] ???
}
rpgCharacter should be the object for the myCharacterController.