Re: NSFormatter isPartialStringValid confusion
Re: NSFormatter isPartialStringValid confusion
- Subject: Re: NSFormatter isPartialStringValid confusion
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 22 Aug 2003 15:50:20 -0400
on 03-08-22 11:53 AM, email@hidden at email@hidden wrote:
>
I am confused by the descriptions of the two NSFormatter isPartialStringValid
>
methods in the Foundation Reference. I can't tell if the two methods are
>
mutually exclusive or if they address different editing scenarios. In other
>
words, do I only need to override
>
isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRang>
e
>
:errorDescription: in my subclass, or do I need to also override
>
isPartialStringValid:newEditingString:errorDescription:?
They are mutually exclusive with respect to any one formatter. The short one
is the older one, and you'll see in the header file that it is still there
only for backward compatibility reasons (although it is easier to use for
very simple formatters). The longer, newer one is the preferred one, as it
gives you vastly greater control over the location of the cursor and the
extent of the selection in the text field once the formatter returns.
--
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
_______________________________________________
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.