Re: Magic method calls in NSArrayController
Re: Magic method calls in NSArrayController
- Subject: Re: Magic method calls in NSArrayController
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 2 Feb 2005 10:06:43 -0800
On Feb 2, 2005, at 10:01 AM, Roger deBry wrote:
A "Create New" button is connected to the NSArrayController's "insert"
action. He has written the following method in his Document class:
- (void) insertObject:(Person *)p inEmployeesAtIndex:(int)index;
In his book he simply says that this method will be called
automatically when the NSArrayController wishes to insert a Person
object into the array.
I wrote the code and indeed this works. However, I have no idea why,
and so I am not sure that I could re-create this behavior in my own
programs.
See "Programmatic modifications to arrays not noticed by table view" at
<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html> and
<http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/AccessorConventions.html>
mmalc
_______________________________________________
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