Skip navigation.
 
mlRe: NSImageView blocking drag -- solved
FROM : Gordon Apple
DATE : Sat May 03 19:17:25 2008

That post was in the middle of the night when I couldn't sleep.  I
researched the archives this  morning and found the solution.  I added an
outlet in my controller to the NSImageView and in awakeFromNib called
unregisterDraggedTypes for the NSImageView.  Problem solved.  However, I
still think that this should be the default behavior for a disabled view.


>
>  I have a custom view that contains a (covering) NSImageView.  The latter
> is disabled.  I want the custom view to handle all drag operations.  This
> works fine as long as I don't drag in a type (e.g., NSFilenamesPboardType)
> that NSImageView directly supports.  setAllowsCutCopyPaste:NO for the
> NSImageView does not help.  The drop never gets to the custom view (yes, it
> registers the types) but is simply rejected by the disabled NSImageView.  My
> custom view's dragOperationForDraggingInfo never gets called in such case.
> If I squeeze down the NSImageView and drag directly to the exposed custom
> view, it works fine.
>
>  Shouldn't disabling the NSImageView make it effectively invisible for
> all such operations?  Bug report time?
>

Related mailsAuthorDate
No related mails found.