On 16/08/2009, at 5:51 AM, Iceberg-Dev wrote:

When the drop is validated in the right window (type of item accepted), I would like to either display a window above the right window or change the right window content to give the user a list of more detailed possible drop locations.

Something like this:

+-------------------+    +-------------------+
+-------------------+    +--------+----------+
|                   |    |        |          |
|      +-----+      |    |        |          |
|      |  A  |      |    |  Left  |   Right  |
|      +-----+      |    |        |          |
|                   |    |        |          |
+-------------------+    +--------+----------+

There's something like this in Final Cut Pro (http://www.geniusdv.com/news_and_tutorials/assets_c/2009/04/superimpose3-thumb-394x397-2264.gif ).

Question:
---------

How could this be achieved in Cocoa?


I have tried with a window but the target of the drop does not get changed.


Firstly I'd advise you to think whether a more straightforward design is possible. Drag/Drop is inherently a mouse-targeted operation, where there is a distinct end point to act as a drag target. If you haven't got that, maybe drag/drop isn't an appropriate way to handle the desired operation. In addition, regardless of FCP doing it, the user isn't expecting a jack-in-the-box to leap out at the last second and present a whole bunch of options - the target should be there from the start.

Nevertheless, if you did insist on ploughing this furrow, I can think of ways it can be done.

Design your target window/views so that they can be quickly switched between the 'normal' and 'drop target' modes. How you do this is up to you, for example with a split pane that opens to reveal the additional 'drop targets' section. Design, Build and Test this separately from the drag/drop code. Once working to your satisfaction, integrate it with the NSDraggingDestination protocol. Rather than reveal the targets at drop time, it would be better to reveal them on drag enter, so that the user can see the targets available while they're dragging, and have plenty of time to a) choose a destination simply by dragging to it, and b) giving them a chance to choose nothing after all, by backing off (and thus drag leaving should close the drop targets pane).

I wouldn't try opening a window underneath the drop - it's kludgey, unlikely to work and is not a nice behaviour for the user.

--Graham


_______________________________________________

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