Hey guys,
I've got a text field, and in it I want it to save the data when I click a button.
I do this code when I click a button:
Code:
[[NSUserDefaults standardUserDefaults] setObject:[codeTextField stringValue] forKey:@"RegistrationCode"];
And in awakeFromNib I do this code to load what was in the text field back in:
Code:
[codeTextField setStringValue:[[NSUserDefaults standardUserDefaults] stringForKey:@"RegistrationCode"]];
But for some reason, I get this weird crash on startup, here is what it says:
2004-04-24 21:01:12.914 Tag[4392] *** Assertion failure in -[NSTextFieldCell _objectValue:forString:], AppKit.subproj/NSCell.m:1131
2004-04-24 21:01:12.925 Tag[4392] An uncaught exception was raised
2004-04-24 21:01:12.931 Tag[4392] Invalid parameter not satisfying: aString != nil
2004-04-24 21:01:12.938 Tag[4392] *** Uncaught exception: <NSInternalInconsistencyException> Invalid parameter not satisfying: aString != nil
«PROJECTNAME» has exited due to signal 5 (SIGTRAP).
I am totally at lost here, as I get no warnings or errors when building, any ideas appreciated

.
Thanks,
Oliver