• 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
Binding NSTextField to a number through NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding NSTextField to a number through NSArrayController


  • Subject: Binding NSTextField to a number through NSArrayController
  • From: Todd Heberlein <email@hidden>
  • Date: Sat, 30 Jun 2012 12:00:55 -0700

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@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: Binding NSTextField to a number through NSArrayController
      • From: Conrad Shultz <email@hidden>
    • Re: Binding NSTextField to a number through NSArrayController
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Sorting an NSTableView bound to an NSArrayController.
  • Next by Date: Re: UILabel sizeToFit is shrinking the Label width
  • Previous by thread: SO SORRY!
  • Next by thread: Re: Binding NSTextField to a number through NSArrayController
  • Index(es):
    • Date
    • Thread