• 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: mutableArrayForKeyValue Question (ignore other email)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutableArrayForKeyValue Question (ignore other email)


  • Subject: Re: mutableArrayForKeyValue Question (ignore other email)
  • From: mmalc crawford <email@hidden>
  • Date: Sat, 28 Jun 2008 20:03:21 -0700


On Jun 28, 2008, at 7:42 PM, Alex Wait wrote:

I am trying to modify the array controller programmatically and I'm running
into problems using mutableArrayForKeyValue
I am using this line
id proxy = [controller mutableArrayValueForKey:@"Person"];
when I do
[proxy addObject:newPerson]
I get
[<NSArrayController 0x130050> valueForUndefinedKey:]: this class is not key
value coding-compliant for the key Person.
In IB I have bound the Content Array to my array member in App Controller.
Shouldn't this work?


No.
Just as the error states, @"Person" is not a valid key for the controller.


I have set the class name to be of the "Person" class. Right now the key I
am using is "Person" but I have also tried "array" and got the same problem.


Similarly, @"array" is not a valid key for the controller.

What do I do next?

Look at the API reference for NSArrayController to see what are valid messages to send to the controller to achieve what it is that you want; read the bindings conceptual documentation to see how else you might achieve this by modifying the source data controller; or look at the myriad online examples that illustrate this.

mmalc

_______________________________________________

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: mutableArrayForKeyValue Question (ignore other email)
      • From: "Alex Wait" <email@hidden>
References: 
 >mutableArrayForKeyValue Question (ignore other email) (From: "Alex Wait" <email@hidden>)

  • Prev by Date: Re: Building a Setup Assistant
  • Next by Date: Re: mutableArrayForKeyValue Question
  • Previous by thread: mutableArrayForKeyValue Question (ignore other email)
  • Next by thread: Re: mutableArrayForKeyValue Question (ignore other email)
  • Index(es):
    • Date
    • Thread