Re: Custom Views and Dragging ... [ with attitude ]
Re: Custom Views and Dragging ... [ with attitude ]
- Subject: Re: Custom Views and Dragging ... [ with attitude ]
- From: J Nozzi <email@hidden>
- Date: Wed, 21 Apr 2004 23:33:53 -0400
On Apr 21, 2004, at 11:21 PM, m wrote:
What the responder was driving at was that in Cocoa, what appears to
the user as "dragging a view" is not in fact dragging a view. You're
creating the illusion of dragging a view. What you're really doing is
dragging an image and after the drop, modifying the view hierarchy
yourself.
If you really must actually drag a view from one view to another,
you'll need to roll your own solution.
Thank you. Succinct, and not parroted. ;-) So the way it should go is
something like: "user begins dragging custom view, custom view 'image'
is created for use with drag operation, drag operation receiver handles
things like the 'plus' cursor and possibly moves other custom views out
of the way (a la iMovie), and accepts the drop, the custom view is
'removed' from the sending superview then added to the target/receiving
superview."
Is that about right? If so, does anybody have a clean example project
that does just this? I like clean examples that don't combine other
'tricks' into one - it just makes it easier to grasp the subject you're
trying to learn when there's nothing else mixed in. ;-)
What you're talking about here is constraining the position of the
image that represents the data being dragged. Again, this isn't
supported by Cocoa drag-n-drop; you'll need to roll your own solution.
Any idea how iMovie might do this? Specifically, the timeline's
constraint? Though I appear to be on the right track with the
previously-mentioned topics, I have no idea where to even begin with
this constraint issue. For instance, would I start with drag-and-drop
and *modify* this or is there no hope and must I 'roll my own' drag-and
drop solution as a whole? The latter, of course, is quite discouraging.
- J
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.