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: Implementing Table Selection Support for Custom Controller?



By "remote array", I mean database that is not on the local machine. I'm basically trying to create bindings support for a MySQL array.

What you've suggested is actually what I'm doing now. The problem is that when I bind a table view to the array controller, the array controller goes through and queries every row in the table for it's values, which really slows down the program unnecessarily. I understand the NSArrayController is probably doing this for sorting and so on, but given that I can control that in the SQL query, I really don't need NSArrayController doing those sort of things for me. My classes are designed to only pull values from rows when they are needed to be displayed.

On Apr 25, 2007, at 7:02 PM, mmalc crawford wrote:


On Apr 25, 2007, at 10:46 AM, Colin Cornaby wrote:

I'm writing my own custom controller that does not use an NSArray for it's backing (it uses a remote array of objects). I'm basically trying to mimic an NSArrayController and am trying to figure out how to implement the the selection observing of a table view that NSArrayController does.

It's not clear what you mean by "remote array".
Can you not simply use an ordinary NSArrayController and in whatever object it is that manages the "remote array" implement suitable indexed accessor methods to "simulate" the array?
<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/AccessorConventions.html#//apple_ref/doc/ uid/20002174-178830-BAJEDEFB>


mmalc


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Implementing Table Selection Support for Custom Controller? (From: Colin Cornaby <email@hidden>)
 >Re: Implementing Table Selection Support for Custom Controller? (From: mmalc 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.