• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSNumberFormatter and 10.4 behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumberFormatter and 10.4 behavior


  • Subject: Re: NSNumberFormatter and 10.4 behavior
  • From: Lee Ann Rucker <email@hidden>
  • Date: Wed, 18 Jul 2007 13:43:31 -0700

   MyNumberFormatter *numberFormatter;
   numberFormatter = [[[MyNumberFormatter alloc] init] autorelease];
   [myTextField setFormatter:numberFormatter];

   [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
   [numberFormatter setMinimumFractionDigits:2];
   [numberFormatter setMaximumFractionDigits:2];
   [numberFormatter bind:@"minimum"
                toObject:creatorData
             withKeyPath:@"myMinValue"
                 options:nil];
   [numberFormatter bind:@"maximum"
                toObject:creatorData
             withKeyPath:@"myMaxValue"
                 options:nil];

@implementation MyNumberFormatter
+ (void)initialize
{
   [self setDefaultFormatterBehavior:NSNumberFormatterBehavior10_4];
}

- (BOOL)isPartialStringValid: (NSString *)partialString
newEditingString: (NSString **)newString
errorDescription: (NSString **)error
{
// Make sure that the NumberFormatter only allows Numbers - something the default really ought to do...
...
}


On 17 juil. 07, at 19:12, mmalc crawford wrote:

How are you creating the formatters?

mmalc


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSNumberFormatter and 10.4 behavior (From: Lee Ann Rucker <email@hidden>)
 >Re: NSNumberFormatter and 10.4 behavior (From: mmalc crawford <email@hidden>)
 >Re: NSNumberFormatter and 10.4 behavior (From: Lee Ann Rucker <email@hidden>)
 >Re: NSNumberFormatter and 10.4 behavior (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: Coordinates of Pixels
  • Next by Date: Re: Tracking Rectangle Bounds
  • Previous by thread: Re: NSNumberFormatter and 10.4 behavior
  • Next by thread: creating a controller class
  • Index(es):
    • Date
    • Thread