Re: NOT Drag and Drop onto the Desktop
Re: NOT Drag and Drop onto the Desktop
- Subject: Re: NOT Drag and Drop onto the Desktop
- From: Don McConnell <email@hidden>
- Date: Mon, 10 Dec 2001 17:16:43 -0600
Hello ...
me> How do I keep the user from dragging stuff out of my
> game's window?
bw> What drag types are you registering on the pasteboard?
> If you only register private types (i.e. ones not defined
> in the Cocoa framework), then no drops into the Finder
> should occur.
I register NSStringPboardType. I don't actually _use_ any
dragged information (the string is empty; bookkeeping about
what's being moved is managed in another part of the code).
So, it's conceivable that I could just as easily concoct a
private type and load it up with empty data.
However, creating a drag type that the Finder doesn't want
seems (no offense) a thoroughly unsatisfying solution.
Surely there are legitimate circumstances calling for Cocoa-
defined drag types where dragging off-window is undesirable.
(I foresee one in another project.) Isn't this the whole
purpose for "draggingSourceOperationForLocal:" (which
another respondent suggested, although my original message
reports having tried the method without success)?
(By the way: I just noticed that if I drag one of my cards
to the Trash, the Trash highlights and "accepts" the card
(although the icon doesn't change to "full"), removing the
card from the game without even leaving a clipping to
remember it by. Is this the same problem as dropping
clippings onto the Finder, or is this a whole other anomaly
to sort out?)
Thanks and regards,
Don