Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confused with Chapter 7 in Hillegass' book (2nd ed.)



Mmalcolm (and others),

This was an excellent pointer and has me 99% of the way to feeling on the up and up with this chapter (instead of simply fed-up with this chapter).

When I was setting up this application in IB I set up a binding from the button that would create a new entry in the table (which this NSArrayController is bound to) to the target insert: .

How does my button's insert: know to automagically use (defer to?) insertObject:in<Key>AtIndex: ? The document hosted at developer... doesn't say that it supercedes insert: automagically -- what's the missing link?

Here's my hypothesis, maybe you can very simply say yes and confirm my understanding... 8)

1. Per Hillegass' tutleage (for those of you at home with the book) I modified the bindings in the File's Owner (MyDocument). In the inspector I set the Model Key Path: text field to employees.

Thus, with that defined, the table no longer /simply/ performs 'insert:' in knows that it should opt for insertObject:in(key = employees)AtIndex: ?

Is that the correct understanding of the background magic?

TIA,

Steven


mmalcolm crawford wrote:

On Jul 28, 2004, at 3:52 PM, Steven Harms wrote:

p. 146 - How does the insert: message equate into the just explained 'insertObject:inEmployeesAtIndex" ?

<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/AccessorConventions.html#//apple_ref/doc/uid/ 20002174/BAJEDEFB>

See:
"Indexed Accessor Patterns for To-Many Properties"

and list archives ad lib., e.g. <http://www.cocoabuilder.com/archive/message/2004/3/15/101716>

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Confused with Chapter 7 in Hillegass' book (2nd ed.) (From: Steven Harms <email@hidden>)
 >Re: Confused with Chapter 7 in Hillegass' book (2nd ed.) (From: mmalcolm crawford <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.