• 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
mutableArrayValueForKeyPath gives me valueForUndefinedKey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mutableArrayValueForKeyPath gives me valueForUndefinedKey


  • Subject: mutableArrayValueForKeyPath gives me valueForUndefinedKey
  • From: Michael Hanna <email@hidden>
  • Date: Fri, 8 Jul 2005 18:42:41 -0400

in my AppController(which is the outlet of an NSController via IB) I have a field instance

NSMutableArray *entries;

which is observed with an Entries NSArrayController such that

contentArray:

Bind To: DLControllerAlias(NSController)
Controller Key: selection
Model Key Path: entries


It contains DLEntry objects. Each DLEntry has another NSMutableArray called passages(which is also observed with an NSArrayController Passages):


contentArray:

Bind To: Entries
Controller Key: selection
Model Key Path: passages

of DLPassage objects

when I try to add a single DLPassage object to a given DLEntry:

    if ([oEntriesTable selectedRow] == -1)
        return;

NSMutableArray * passagesArray;
NSMutableArray * entriesArray = [self mutableArrayValueForKey: @"entries"];


DLEntry *anEntry = [entriesArray objectAtIndex:[oEntriesTable selectedRow]];
passagesArray = [self mutableArrayValueForKeyPath: @"anEntry.passages"];



this results in an error:

2005-07-08 18:29:46.469 DreamLog[19937] [<DLController 0x363090> valueForUndefinedKey:]: this class is not key value coding-compliant for the key anEntry.


looked into this by searching the archives but came up with nothing on mutableArrayValueForKeyPath. Any ideas why this is happening? I'm quite the newb on all things bindings.


regards,
Michael


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: mutableArrayValueForKeyPath gives me valueForUndefinedKey
      • From: Charilaos Skiadas <email@hidden>
  • Prev by Date: Re: No blinking cursor in my text field.
  • Next by Date: Entities bound through third entity. Best practice?
  • Previous by thread: Re: NSColor to color name/NSString:
  • Next by thread: Re: mutableArrayValueForKeyPath gives me valueForUndefinedKey
  • Index(es):
    • Date
    • Thread