On 2 Nov 2011, at 11:40 PM, George Nachman wrote: > I just moved to XCode 4, from the Mac OS 10.5 SDK to the 10.6 SDK, and > from Snow Leopard to Lion. A behavior that changed is that entering > invalid text into an NSTextField with an NSNumberFormatter causes the > entire field's contents to be erased rather than disallowing the bogus > character from being added.
Try this: Subclass NSNumberFormatter, and implement isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: (preferred) or isPartialStringValid:newEditingString:errorDescription:. You may have to setPartialStringValidationEnabled: YES. At least, that's my reading of the documentation. I haven't tried it myself. — F _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com