I have a User class with the properties myUsername and myPassword and I want my text fields in the UI to pass the string values to an AppDelegate method called link which does some background NSTask things and to a method setUserCredentials for the user object.
However, using NSSecureTextField to retrieve the password and then passing it to NSLog to verify always print (null) to screen? NSTextField works fine.
[self.activeUser setMyUsername:self.myUsernameTextField.stringValue];
[self.activeUser setMyPassword:self.myPasswordSecureTextField.stringValue];
NSLog(@"Username: %@", self.activeUser.myUsername);
NSLog(@"Password: %@", self.activeUser.myPassword);
prints:
2013-02-09 23:34:58.491 LabSync[25215:303] Username: jon
2013-02-09 23:34:58.491 LabSync[25215:303] Password: (null)
Totally new to Obj-C, Cocoa and XCode. Couldn't find anything in the docs or a search about this. the Secure field is supposed to be identical to the regular field except it prevents copy, cut and paste and viewing the string (or so I read).
How do I get the password value?