NSTextField.objectValue returning bogus value
NSTextField.objectValue returning bogus value
- Subject: NSTextField.objectValue returning bogus value
- From: David Kocher <email@hidden>
- Date: Thu, 29 Jan 2004 14:37:48 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a sheet with a textfield and a default button the user can
either click or just hit the <enter> key as it is the default button in
the window. When the button is clicked an action is fired to a
closeSheet(NSButton sender) method which will update the controller
with the new values entered and close the sheet. The problem is that
the value returned from NSTextField.objectValue() is different if the
user clicks the button or simply hits the the return key.
#1 the user hits the <enter> key. the value is returned as expected
(what the user entered in the text field)
#2 the user clicks the button. the value returned is an empty string
(not null, but userField.objectValue().equals("") returns true)
I also called NSTextField.validateEditing() before reading the values
but it won't make a difference. Also stringValue() and objectValue()
returns the same.
Thanks for any hints :)
- --dk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAGQytdBH4SdTFvT4RApEJAJ0Ym+mdFfT/bpNfYjNszfRx/AM6IACeJf8R
wEhBCBrF15iSN/OGr7sn808=
=apX+
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.