• 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
dragging images/slide back
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: making NSTableView firstResponder programmatically
  • Next by Date: Re: Getting key events when the program is in the background?
  • Previous by thread: [Solved] Specifying primitive types in NSCoders ... Thanks
  • Next by thread: Re: Gif to TIFF and transparency
  • Index(es):
    • Date
    • Thread