• 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: Core Data bindings question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data bindings question


  • Subject: Re: Core Data bindings question
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 7 Feb 2011 17:40:44 -0800

On 2011 Feb 07, at 16:46, Darren Wheatley wrote:

> When I try to bind the  enabled property I get the following error:
>
> "cannot create BOOL from object of class __NSArray0"
>
> Does anyone have any idea how I can achieve the desired result?

Yes, most people get that the first time they try this.  It can be a little counterintuitive until you understand it.

The error is helpful, though.  As the error implies, you are probably binding a checkbox to an array (__NSArray0).  You need to bind the *table column* instead of the checkbox.  The typical binding for this case looks something like:

* Table Column Bindings
** Value, or Enabled
Bind to:         FooArrayController
Controller Key:  arrangedObjects
Model Key Path:  active


_______________________________________________

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

References: 
 >Core Data bindings question (From: Darren Wheatley <email@hidden>)

  • Prev by Date: Re: Printing Appears Very Small in Lower-Left Corner of Page
  • Next by Date: OK to share managed object model across MOCs?
  • Previous by thread: Core Data bindings question
  • Next by thread: OK to share managed object model across MOCs?
  • Index(es):
    • Date
    • Thread