Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NOT Drag and Drop onto the Desktop



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




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.