[More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
[More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
- Subject: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
- From: Alexander Hartner <email@hidden>
- Date: Tue, 29 Nov 2005 23:02:19 +0000
What are the major differences between :
1.) [[self mutableArrayValueForKey:@"array"] addObjects:someObjects]
and
2.) [contactTableController addObject:contact];
I would image the 2nd option to be slightly quicker as it accesses /
notifies the controller directly, rather then access the array via
KVC. What my question really boils down to is what is wrong with the
second option or is it acceptable ?
Alex
On 11 Oct 2004, at 07:57, Vincent Coetzee wrote:
Thanks to everyone for their suggestions, the examples shown on
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
were invaluable and have solved the problem.
Thanks
Vince
On Oct 08, 2004, at 16:07, Jeff Gilbert wrote:
On Friday, October 08, 2004, at 04:08AM, Vincent Coetzee
<email@hidden> wrote:
Hi there
I have an NSArrayController that is bound to the columns in an
NSTableView. The table view correctly picks up the values that
are in
the array managed by the controller when it initially displays, but
does not update when I add new objects to the array. All other
functionality seems fine. Are there any known issues with using an
NSArrayController with an NSTableView. Visual inspection of the
array
managed by the NSArrayController shows that the added values are in
fact there, attempting to force the table view to reload it's
data by
means of reloadData also has no effect. Does anyone have any
suggestions ?
Thanks in advance
Vincent
You can find some useful information on mmalc's excellent bindings
website:
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
Look for the section titled "Programmatic modifications to arrays
not noticed by table view". Basically, calling [array
addObjects:someObjects] will not cause the array controller to be
notified of the change to array. The technique I use is to call:
[[self mutableArrayValueForKey:@"array"] addObjects:someObjects]
Good luck,
Jeff Gilbert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40fnb.co.za
This email sent to email@hidden
______________________________________________________________________
_____________________________
The views expressed in this email are, unless otherwise stated,
those of the author and not those
of the FirstRand Banking Group an Authorised Financial Service
Provider or its management.
The information in this e-mail is confidential and is intended
solely for the addressee.
Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted in reliance on this, is
prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and
integrity of information and data transmitted electronically and to
preserve the confidentiality thereof, no liability or
responsibility whatsoever is accepted if information or data is,
for whatever reason, corrupted or does not reach its intended
destination.
________________________________
_______________________________________________
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
_______________________________________________
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