On Apr 9, 2011, at 18:00, Richard Somers wrote:

> I have a primary view which displays all objects using a primary controller. 
> Both 'A' and 'B' objects are included in the controller content. This is 
> accomplished by using an abstract class in the managed object model that is a 
> parent of both 'A' and 'B' objects. The primary array controller content is 
> the abstract class, so we get all objects.


On Apr 9, 2011, at 10:12 PM, Quincey Morris wrote:

> Are you talking about selecting rows in a table view or an outline view, or 
> selecting objects in a custom view?

The primary view is a custom view that displays objects spatially according to 
their position in x, y, z coordinate space. The secondary views are table type 
views.

> If you're talking about a table/outline view, I'd just use the "selection did 
> change" delegate methods to propagate selections from one list to another.
> 
> If not, but the selection is part of the state of a window controller, I'd 
> make a window controller property for each list, and observe those 
> properties, either in the window controller or the individual views.
> 
> Or, if the selection is to be saved with the data model, I'd put a (probably 
> just one) selection set property in the data model, and use the window 
> controller (for example) as a mediating controller to propagate derived 
> properties to the views.

I currently have a transient selection property for each object in the data 
model which helps in restoring the selection when undoing an object delete. The 
primary controller (for the custom primary view) is a custom programatic 
subclass of NSArrayController that synchronizes the primary controller 
selection with the transient selection property.

The secondary controllers (NSArrayController and NSObjectController) and 
secondary views (table views) are all standard Interface Builder objects.

The problem is how to synchronizing the selection among all the various 
controllers.

--Richard Somers

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to