On Dec 16, 2011, at 11:48 PM, Quincey Morris wrote: > There are various solutions you might choose, depending on how you expect to > handle validation errors for your text field. You can add a number formatter > to the field, or you can change the property to type long long (though you > then need to check for negative numbers yourself), or you can use KVC > validation to substitute a NSNumber object for the NSString object.
Changing the value from NSInteger to NSNumber in my model did the trick, I don't get the crash anymore, and everything updates accordingly. I don't have to use a formatter either, although I probably need to add anyway to prevent the user from typing anything else but numbers. The only that does't work yet is that I need to hit enter or tab to have my model respond to a change in the NSTextField. As suggested earlier, I set the binding "Continuously Update Value", but that doesn't work. I also see a small exclamation mark (white on a red circle), in the Model Key Path bindings field, where I bind to my model. Xcode autocompletes the correct property, so I'm not sure what to do with this, since everything works. I don't see that exclamation mark in the NSStepper bindings field. - Koen. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
