Re: Formatter Trouble
Re: Formatter Trouble
- Subject: Re: Formatter Trouble
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 11 Sep 2002 16:52:27 -0400
on 02-09-11 12:37 PM, Christian Weykopf at email@hidden wrote:
>
in my application I try to prevent some NSTextfields from left blank.
>
First try: textShouldEndEditing - nothing happens. Will only be called if
>
I type a char and delete it then. ??_
By preventing fields from being "left blank," do you mean left blank when
the user closes the window, or what? Whatever user action you mean, find the
"should" delegate method or notification that is triggered when the user
attempts to do that, and check all the fields' contents for empty strings.
If you find some, return NO from the delegate method and put up sensible UI.
You can't use a formatter to check for an empty text field, because
formatters aren't triggered by ending editing with a field empty. Try it,
and you'll see this is so. I assume the reason is because it's normal to
leave fields empty. It isn't considered a formatting issue.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.