Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-17 Thread Quincey Morris
On Sep 17, 2010, at 12:16, Martin Wierschin wrote: > I am binding to the shared NSUserDefaultsController in IB, not NSUserDefaults > directly. I doubt Ken really thought you were binding to anything other than NSUserDefaultsController. He was really elbowing me, correctly, for having said some

Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-17 Thread Martin Wierschin
On 2010.09.16, at 7:52 PM, Ken Thomases wrote: On Sep 16, 2010, at 5:06 PM, Quincey Morris wrote: Regarding NSUserDefaults, I don't see anything in the documentation that claims KVC compliance for NSUserDefaults, though I could easily have missed it. You're not supposed to bind to the share

Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-16 Thread Ken Thomases
On Sep 16, 2010, at 5:06 PM, Quincey Morris wrote: > Regarding NSUserDefaults, I don't see anything in the documentation that > claims KVC compliance for NSUserDefaults, though I could easily have missed > it. You're not supposed to bind to the shared NSUserDefaults instance. There's a separa

Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-16 Thread Martin Wierschin
Hi Quincey, Thank you very much for taking the time to reply and help me out. These diagrams are *very* old (2003, it looks like), and it's not clear if they're accurate any more. So anything deduced from them needs to be verified. However, they don't give you any good news, because they s

Re: bindings and NSNumberFormatter, enforcing min/max values

2010-09-16 Thread Quincey Morris
On Sep 16, 2010, at 14:00, Martin Wierschin wrote: > The quick summary: Actually, you've covered a lot of ground here, so there are multiple issues implicit in your question. If you look here: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concept

bindings and NSNumberFormatter, enforcing min/max values

2010-09-16 Thread Martin Wierschin
Hello all, The quick summary: I want to display some formatted numbers in text fields. These numbers are stored in NSUserDefaults, and need to be displayed with unit suffixes, eg: "5 cm". If the user enters an invalid number, say a negative length, I simply want to clip the value to the app