IIRC that's just telling you that IB can't validate your keypath. (There's a 
place in one of the inspectors to define what the "known" keypaths are.)

NSValueTransformer is generally not applicable for numbers, but it's usually 
good practice to attach an NSNumberFormatter to the field to handle both 
display formatting and input validation (e.g. min/max, etc.)

(Sent from my iPad.)

--
Conrad Shultz

On Jun 30, 2012, at 12:00, Todd Heberlein <[email protected]> wrote:

> I have an NSTextField that I am binding to an NSArrayController's selection 
> (a number value in that selection). In the "Model Key Path" field I get an 
> exclamation mark inside a red stop sign icon.
> 
> Even more confusingly, the code still works. I get the right value! But that 
> exclamation mark has be nervous (like it works now, but no guarantee).
> 
> What am I doing wrong?  Do I need to do something special when binding an 
> NSTextField to an NSNumber or NSInteger?  Do I need to venture into the world 
> of NSValueTransformers whenever I bind an NSTextField to anything other than 
> an NSString?
> 
> 
> Thanks,
> 
> Todd
> 
> Here is my binding settings for the NSTextField
> 
> Bind to: procArrayCtlr (an NSArrayController)
> Controller Key: selection
> Model Key Path: recordCount  <-- this gets red exclamation mark
> Value Transformer: (empty right now)
> 
> _______________________________________________
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/conrad%40synthetiqsolutions.com
> 
> This email sent to [email protected]

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to