• 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
Re: Changing draggedImage in mid-drag
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing draggedImage in mid-drag


  • Subject: Re: Changing draggedImage in mid-drag
  • From: "John C. Randolph" <email@hidden>
  • Date: Sun, 16 Sep 2001 07:56:08 -0700

On Sunday, September 16, 2001, at 06:52 AM, Don McConnell wrote:

Hello ...

I want to have draggedImage change while being dragged, to
provide some specialized feedback in a game.

My first attempt was, within the 'draggingUpdated' method,
to lockFocus on the draggedImage, draw in my changes, and
then unlockFocus. Nothing appears to happen (perhaps because
I lack of the conceptual equivalent of NSView's 'display' to
update the draggedImage image?).

After you update the image, you still have to tell whatever view is displaying that image to redraw itself.

In NeXTSTEP, dragging was implemented with a transparent window into which the dragged image was drawn. I would get hold of the dragging window, and send a -display message to its contentview. I'm not seeing a way to get hold of that window in Cocoa, though.

Maybe if you implement -draggedImage:movedTo: method in your dragging source, you can alter the image there.

-jcr

"We have awakened the Sleeping Giant" -Admiral Isoroku Yamamoto, Dec 7, 1941.


References: 
 >Changing draggedImage in mid-drag (From: Don McConnell <email@hidden>)

  • Prev by Date: Changing draggedImage in mid-drag
  • Next by Date: Re: Example DotView from Learning Cocoa.
  • Previous by thread: Changing draggedImage in mid-drag
  • Next by thread: Re: Changing draggedImage in mid-drag
  • Index(es):
    • Date
    • Thread