Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Restrict drag to one window

Restrict drag to one window
Thread Tools
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Dec 2, 2001, 01:27 AM
 
Hello ...

How do I prevent the user from dragging an element out of a window and depositing it (as a clipping) on the Desktop or a Finder window?

I thought this method

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
- (unsigned int) draggingSourceOperationMaskForLocalBOOL)destInAp p
{
if ( destInApp )
return NSDragOperationGeneric;
else
return NSDragOperationNone;
}
</font>[/code]

in the dragging source would do the trick (telling the dragging spirit to perform a "generic" drag if the candidate destination is in the app, and "no" drag otherwise), but it doesn't. I'm still able to drop my solitaire cards onto the Desktop without my application realizing that that's a problem.

What am I missing?


Thanks and regards,

DayLateDon
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Dec 7, 2001, 05:44 AM
 
Hello ...

My message was about to disappear, unanswered, off the bottom of the page, and I really need an answer to this question.


Thanks,

DayLateDon
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:18 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2