NSTextField Selection Problem
NSTextField Selection Problem
- Subject: NSTextField Selection Problem
- From: Tom Gray <email@hidden>
- Date: Sat, 7 Dec 2002 09:14:28 -0500
As always, thanks for the help guys!
Here is my problem.
I have a series of NSTextFields into which a user of my application is
entering some preference information. I validate the information
entered with control:textShouldEndEditing:
What I want to do is to select the current NSTextField value in the
control:textShouldEndEditing: method. I have tried to do that with
[myNSTextField selectText:nil] but I seem to be in a recursive loop!
From what I can ascertain, adding the [myNSTextField selectText:nil]
line to my control:textShouldEndEditing: method creates an infinite
loop!
It appears like the [myNSTextField selectText:nil] method causes the
control:textShouldEndEditing: method to be called.
So, the goal is to validate the text in an NSTextField and to select
the text if it is not valid.
(In my simple case I am simply checking the length of a user entered
password.)
Tom Gray
-------------
email@hidden
or
email@hidden
_______________________________________________
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.