Re: primary/secondary selection pattern for NSArrayController?
Re: primary/secondary selection pattern for NSArrayController?
- Subject: Re: primary/secondary selection pattern for NSArrayController?
- From: "Eric Miller" <email@hidden>
- Date: Sat, 14 Apr 2007 11:09:20 -0600
Thanks for the feedback, Scott. Just to follow up on this, the context
for this -- my custom view -- shows the group of objects floating in 3
dimensions. I want the user to be able to make relationships among
them, so that they form a directed object graph. This needs to be
doable via direct manipulation.
Since the graph is directed, the direction of the edges between nodes
is important, and the best way I can think of to expose that to the
user is to have one object in the selection be flagged as special.
That's the "from" node, and everything else in the selection becomes
the "to" nodes. So the user can click-drag to marquee-select,
option-click to specify the "primary" selection -- ie, the "from" node
-- and perform a "make relationship edges" action, which draws edges
from the primary selection to every other node in the selection. Sound
reasonable?
It is an unusual interface, so maybe it calls for some unusual
selection behavior. But if there is a more common, proven paradigm
that would do what I want, I'd be interested in hearing about it.
(I'm going to implement a "draw edges" tool, but that should be
straightforward.)
Anyway, I've implemented it in my app, but some of the behavior leaked
out of the controller, so that's less than ideal. Still open to ideas
about making an NSArrayController implement primary/secondary
selection entirely "in-house."
thanks!
Eric Miller
Immortal Cookie Software
Date: Mon, 9 Apr 2007 23:43:00 -0700
From: Scott Stevenson <email@hidden>
On Apr 9, 2007, at 11:46 AM, Eric Miller wrote:
> The behavior I want is that there is always an object in the
> controller's selection which is the "primary" selection. Other objects
> in the selection are "secondary." The user may (in my case, via a
> custom view) change the primary selection, but lacking that, if there
> is any selection, the controller must designate *some* object as the
> primary.
I don't think there's anything like this built it, but that's really
because there's no widely-established behavior in the Mac user
interface for it. There's only "one thing" and "a group of equal
things."
There is usually a concept of which item in the group was clicked
first, but I think that's slightly different from what you mean.
It certainly could be implemented, but it steps outside of what users
have come to expect. My opinion is that you should make sure there's
a really, really good reason to do it if you're going to redefine
such a fundamental behavior.
- Scott
_______________________________________________
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