Re: NSArrayController delete objects once removed
Re: NSArrayController delete objects once removed
- Subject: Re: NSArrayController delete objects once removed
- From: Chris Hanson <email@hidden>
- Date: Sat, 15 Dec 2007 17:28:26 -0800
On Dec 15, 2007, at 4:31 AM, Matthew Delves wrote:
The logic of my application is that there is an NSArrayController
which contains an array of object that are displayed in an
NSTableView.
Better would be to have the array of model-layer objects actually
owned by some other object in your system, and only *controlled* by an
NSArrayController.
Then when your view-layer code asks the NSArrayController to remove an
object, it will pass that removal along to its content array, which is
the model-layer removal.
In general, I almost never have an NSController subclass which
actually "owns" or "contains" the object or objects it controls.
Doing so is fine for putting together demos in Interface Builder but
it isn't really the kind of model-view-controller architecture needed
for real applications.
-- Chris
_______________________________________________
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