• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Controller Selection Synchronization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controller Selection Synchronization


  • Subject: Re: Controller Selection Synchronization
  • From: Richard Somers <email@hidden>
  • Date: Sun, 10 Apr 2011 08:56:18 -0600

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 (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

  • Follow-Ups:
    • Re: Controller Selection Synchronization
      • From: Quincey Morris <email@hidden>
References: 
 >Controller Selection Synchronization (From: Richard Somers <email@hidden>)
 >Re: Controller Selection Synchronization (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Storing a block in a CF/NSMutableDictionary?
  • Next by Date: Re: Storing a block in a CF/NSMutableDictionary?
  • Previous by thread: Re: Controller Selection Synchronization
  • Next by thread: Re: Controller Selection Synchronization
  • Index(es):
    • Date
    • Thread