> On Jan 11, 2014, at 8:16 AM, Leonardo <[email protected]> wrote:
> 
> I can quite register an NSView to receive a notification (draggingEntered:)
> when a file is drop over it
> 
> NSMutableArray *dragTypes = [NSMutableArray
> arrayWithObjects:NSFilenamesPboardType, nil];
> [myView registerForDraggedTypes:dragTypes];
> 
> I would like to get the same notification when I drag a NSWindow over that
> NSView. Which PboardType should I use?

Window dragging doesn't have anything to do with pasteboards, so there'a no 
pasteboard type you can pass for window dragging.


> I would like to achieve the following target: when I drag a window over an
> NSWiew then release the mouse button, I remove the content from the window
> and I put it within the view, then I delete the window. Photoshop does a
> similar task.

It sounds like you're jumping to a specific implementation based on assumptions 
you've made about how Photoshop works.

But you're going to have to explain your desired behavior in a little more 
detail. What do you mean “drag a window”? Surely Photoshop doesn't let you drag 
any arbitrary desktop window onto a document to snarf its contents; that would 
make it impossible to drag windows around your desktop, and would otherwise be 
impossible to implement.

So, do you actually mean dragging your own app’s _windows_, or are you 
referring to their _file proxies_ (the icons in their title bars that refer to 
the file on disk)?

Or are you referring to something else entirely? Maybe something like Safari, 
which uses the drag manager to drag tabs between Safari windows, but attaches 
its own window to the mouse pointer so it can do the shrink/grow animation?

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to