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



> On Monday, December 10, 2001, at 12:14 AM, cocoa-dev-
> email@hidden wrote:
>
>> So: How do I keep the user from dragging stuff out of my game's window?
>
> 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.
>
In the drag source, implement

- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag
{
BOOL local = flag;
if(local)
return NSDragOperationMove; //or whatever
else
return NSDragOperationNone; //or whatever
}


References: 
 >Re: NOT Drag and Drop onto the Desktop (From: Brian Webster <email@hidden>)



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.