Note that there are some explanatory texts on larger screens.

plurals
  1. POCore Data arraycontroller binding: valueForUndefinedKey
    primarykey
    data
    text
    <p>all</p> <p>I have a NSTableView as well as a three NSTextFields displayed inside a NSWindow. (in the IB). The entity is designed like this</p> <pre><code>Entity: Data Attributes: Title String URL String UserName String Password String </code></pre> <p>I have successfully bound the NSArrayController to the managedObjectContext, and NSTableView to the arrayController's Title attribute, and the NSTableView can show all the titles correctly.</p> <p>I want to implement the following task:</p> <pre><code>When user click one of the row in the NSTableView, the rest of the three NSTextFields can show the records of that row, respectively URL&lt; username and password. </code></pre> <p>so I do the following for the URL part</p> <p>bind a NSTextField to NSArrayController's selection.URL</p> <p><strong>When i run the program, it gives errors, however, if I uncheck the "Raises for not applicable keys" in the binding property, the program can be successfully launched, and value can be correctly shown in the text field. can anyone explain why?</strong></p> <p>the error says:</p> <pre><code> [&lt;NSTableView 0x102240d60&gt; valueForUndefinedKey:]: this class is not key value coding-compliant for the key URL. </code></pre> <p>Here's the part of error log:</p> <pre><code>2012-01-17 11:52:57.533 Quills[98683:407] An uncaught exception was raised 2012-01-17 11:52:57.534 Quills[98683:407] [&lt;NSTableView 0x102240d60&gt; valueForUndefinedKey:]: this class is not key value coding-compliant for the key URL. 2012-01-17 11:52:57.540 Quills[98683:407] ( 0 CoreFoundation 0x00007fff8abd2286 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8d84cd5e objc_exception_throw + 43 2 CoreFoundation 0x00007fff8ac5c4c9 -[NSException raise] + 9 3 Foundation 0x00007fff8d1e8783 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 240 4 Foundation 0x00007fff8d11f462 _NSGetUsingKeyValueGetter + 108 5 Foundation 0x00007fff8d11f3e9 -[NSObject(NSKeyValueCoding) valueForKey:] + 392 6 Foundation 0x00007fff8d13ee76 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 348 7 AppKit 0x00007fff85ab33f1 -[NSArrayController _multipleValueForKeyPath:atIndex:] + 84 8 AppKit 0x00007fff85ab24e5 -[NSArrayController _singleValueForKeyPath:] + 151 9 AppKit 0x00007fff8581909a -[_NSControllerObjectProxy valueForKeyPath:] + 77 10 Foundation 0x00007fff8d13ee39 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 287 11 AppKit 0x00007fff85818f46 -[NSBinder _valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:] + 654 12 AppKit 0x00007fff85818c30 -[NSBinder valueForBinding:resolveMarkersToPlaceholders:] + 171 13 AppKit 0x00007fff85a1cc92 -[NSValueBinder _referenceBindingValue] + 31 14 AppKit 0x00007fff85a1caa3 -[NSValueBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 647 15 AppKit 0x00007fff85a1c788 -[NSValueBinder _observeValueForKeyPath:ofObject:context:] + 303 16 AppKit 0x00007fff85a345af -[NSTextValueBinder _observeValueForKeyPath:ofObject:context:] + 43 17 AppKit 0x00007fff8580abdb -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 591 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload