Re: Question about NSArrayController
Re: Question about NSArrayController
- Subject: Re: Question about NSArrayController
- From: Yann Bizeul <email@hidden>
- Date: Mon, 4 Jun 2007 22:32:58 +0200
The reason that I wanted to get the Array from the controller (and
since figured out how) is that when the user clicks something along
the lines of an 'export to text file' button that it would do so
for all of the objects not just those selected. Is this something
that should be permitted?
Do I understand you are using NSArrayController where you should use
a NS(Mutable)Array ?
NSController's are mainly used for interaction with the UI (Most
famous examples are NSTableView's, and custom views dealing with
collections of objects):
Thanks for your in depth and persuasive outline of how to approach
programming for OS X.
Chris's answer is a very good path to knowledge :-)
Think Object :-)
Yann Bizeul - yann at tynsoe.org
Cocoa Developer
Tynsoe Projects
BuddyPop - GeekTool - SSH Tunnel Manager - ...
http://projects.tynsoe.org/
Le 4 juin 07 à 22:24, Matthew Delves a écrit :
On 04/06/2007, at 5:59 PM, Chris Hanson wrote:
Instead, implement the model-level object that has the collection
of data you're presenting to be compliant with the needs of Key-
Value Coding and Key-Value Observing, you can just bind your
NSArrayController to it. Then just use the appropriate accessor
methods to make modifications to it those model-level objects, and
the changes will be reflected appropriately in your views.
I have the NSArrayController using bindings to classes and its
maintaining the array of those objects. Is this the correct way to
handle things?
The reason that I wanted to get the Array from the controller (and
since figured out how) is that when the user clicks something along
the lines of an 'export to text file' button that it would do so
for all of the objects not just those selected. Is this something
that should be permitted?
Thanks for your in depth and persuasive outline of how to approach
programming for OS X.
Thanks,
Matthew Delves
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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