• 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
Drag to Nowhere and Disappearing Smoke
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drag to Nowhere and Disappearing Smoke


  • Subject: Drag to Nowhere and Disappearing Smoke
  • From: Philip Dow <email@hidden>
  • Date: Tue, 6 Sep 2005 11:50:16 +0200

NSShowAnimationEffect() displays a system animation at a given point in screen coordinates. The effect is used to indicate that an item has been removed from a list without actually deleting the underlying data. An example is dragging an item out of the far left list in a finder window. As you drag, the cursor changes to show the disappearing smoke, and when you let go the system runs the smoke animation. That let's you know you're removing the item from the list without deleting the item itself.

I would like to implement this effect to remove an item from a table without deleting it. I can call the cocoa function no problems. What I'm running up against is catching the drag to nowhere. On the one hand, I'd like to know a drag is going on so that I can change the cursor, on the other I need to know when the drag is finished and, by the criterion of a normal drag, rejected, so that I can show the effect and operate on my data. I figure if the finder can do this, I can get pretty close.

I could catch mouseUp: in my window controller, but then how would I know a drag is involved? Or I could implement drag in my window and handle drops out of my tables in this special way. In either case, I cannot accomplish what the finder can. When dragging out of that far left list, you can drag to anywhere, window or not, to remove the item.

Has anyone had any experience trying something like this, or does anyone know of any online articles or examples?

-Phil

http://phildow.net

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Drag to Nowhere and Disappearing Smoke
      • From: Robert Cerny <email@hidden>
References: 
 >Calling AppleScript from a Cocoa app (From: Phil <email@hidden>)
 >Re: Calling AppleScript from a Cocoa app (From: "email@hidden" <email@hidden>)
 >Re: Calling AppleScript from a Cocoa app (From: Phil <email@hidden>)
 >Re: Calling AppleScript from a Cocoa app (From: "email@hidden" <email@hidden>)

  • Prev by Date: NSValidationNumberTooSmallError with incomplete error message
  • Next by Date: Re: Drag to Nowhere and Disappearing Smoke
  • Previous by thread: Re: Calling AppleScript from a Cocoa app
  • Next by thread: Re: Drag to Nowhere and Disappearing Smoke
  • Index(es):
    • Date
    • Thread