dragging images/slide back
dragging images/slide back
- Subject: dragging images/slide back
- From: Chaz <email@hidden>
- Date: Sat, 29 Jun 2002 15:18:38 -0600
Hello:
I have a question for those of you more experienced with NSViews and
dragging images to and from them in particular. I have an NSView that
draws images to the screen, and there may be quite a lot of images on
the NSView. When dragging these images using NSView's
dragImage:at:offset:event:pasteboard:source:slideBack:, the image on the
view stays while another image of the same thing is being dragged, which
is fine for some cases. But the images I have on my NSView represent
objects and it makes no sense to have a copy of an object being dragged
out of the object. So what I've done is I tell the NSView to erase that
object when it begins to drag it, and it works well.
The problem I'm having with it occurs when I release the image on an
invalid destination and slideBack: is enabled. I tell the NSView to
draw the object again during draggedImage:endedAt:operation:. What
happens is, the image will slide back to where it came from and then
erase itself before the source NSView can redraw the object, resulting
in a pretty back flicker which gets worse the more objects are in the
NSView.
Not using slideBack: doesn't produce the flicker of course, but then
again it doesn't make sense for "objects" to disappear and reappear, and
slideBack: would tell the user better what just happened.
Has anybody here every tried to do anything like this? I've looked
through all the NSView docs I have and can't find a work-around. It
seems it just wasn't designed for such use. Any other solutions?
Thanks,
Chaz McGarvey
_______________________________________________
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.