• 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: "Alex Wait" <email@hidden>
  • Date: Sat, 28 Jun 2008 20:51:05 -0700

i've read most of
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html

and I don't see what you mean. is there some "magic" key?

why isn't it Person or array?
I tried doing
[controller addObject:newObj];
    [table reloadData];

and that 'worked" at least.


On Sat, Jun 28, 2008 at 8:03 PM, mmalc crawford <email@hidden> wrote:

>
> 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
>
>


--
If you can't be kind, at least have the decency to be vague.
_______________________________________________

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

  • Prev by Date: Re: valueForKey: on collections [was: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject]
  • Next by Date: RE: Building a Setup Assistant
  • Previous by thread: Re: mutableArrayForKeyValue Question (ignore other email)
  • Next by thread: Re: mutableArrayForKeyValue Question (ignore other email)
  • Index(es):
    • Date
    • Thread