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
"app"] returns true. I think of the "extension" as the "app" part, not the "app/" part, but ok.
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
Last edited: