Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zeppenwolf

macrumors regular
Original poster
Nov 17, 2009
129
3
MyKillerApp accepts drag/drops of type ".app", and also accepts drag/drops of an alias file to an app...

But I can't find any documentation or anything for accepting a drag of the icon of an app in the dock to my app's window.

All I know so far is that I can break on the draggingEntered: function, (when I d&d with the command key down) but the pasteboard item is crazy nonsense I don't know what to do with.

Can anyone suggest what type of 'flavor' of pasteboard I'm looking at, or where it's described how to decode it... Thx.

RESOLVED:

Ok, well I never did find the documentation, but I got it working just by trying out different things... Dragging with command key from the dock creates a URL promise.

A couple things that threw me: in the draggingEntered: function, the sender's draggingSourceOperationMask is 0, which means NSDragOperationNone, which in other places is kind of like "nil". I don't really get the thinking on this one.

Another little surprise, at least for me, is that if a URL ends like ".../DroppedApp.app/" then [[theURL pathExtenstion] compare:mad:"app"] returns true. I think of the "extension" as the "app" part, not the "app/" part, but ok.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.