• 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: Bindings making NSNumberFormatter strange
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings making NSNumberFormatter strange


  • Subject: Re: Bindings making NSNumberFormatter strange
  • From: Keary Suska <email@hidden>
  • Date: Thu, 23 Apr 2009 15:04:22 -0600


On Apr 23, 2009, at 2:25 PM, Lee Ann Rucker wrote:

It is not your only choice, but it is probably the best choice.
Another poster suggested using isPartialStrignValid of the formatter,
but I have tried this in the past and run into undo issues,
particularly when using it to "filter" input. The problem is that undo
registration happens before the validation call, and somehow the "undo
typing" feature remembers the string, so when you change the string in
the validator method, and then undo, you can get add results and out-
of-bounds exceptions. Since then I haven't looked into why this
happens and how to get around it, if at all possible.


There's no workaround. I tried writing my own Undo handler, but as you've discovered the changes happen before there's a chance to handle them.

Formatters work, and bindings work, but the combination doesn't. The only solution I've found is to use a formatter without bindings, since having the formatter is more important than having bindings, useful as they may be.

Just to be clear, are you saying that you can do field filtering with a formatter, with appropriate undo support, without bindings, or are you making a general remark about difficulties when using bindings with formatters?


Thx,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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


  • Follow-Ups:
    • RE: Bindings making NSNumberFormatter strange
      • From: Lee Ann Rucker <email@hidden>
References: 
 >Bindings making NSNumberFormatter strange (From: Ulai Beekam <email@hidden>)
 >RE: Bindings making NSNumberFormatter strange (From: Ulai Beekam <email@hidden>)
 >Re: Bindings making NSNumberFormatter strange (From: Keary Suska <email@hidden>)
 >RE: Bindings making NSNumberFormatter strange (From: Ulai Beekam <email@hidden>)
 >Re: Bindings making NSNumberFormatter strange (From: Keary Suska <email@hidden>)
 >Re: Bindings making NSNumberFormatter strange (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Next by Date: Re: ESC while editing NSOutlineView subclass
  • Previous by thread: Re: Bindings making NSNumberFormatter strange
  • Next by thread: RE: Bindings making NSNumberFormatter strange
  • Index(es):
    • Date
    • Thread