Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: mouse pointer for drag copy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse pointer for drag copy



On Jul 29, 2004, at 11:11 AM, Adam Maxwell wrote:

[tv dragPromisedFilesOfTypes:[NSArray arrayWithObject:@""]
fromRect:imageLocation
source:tv
slideBack:YES
event:[NSApp currentEvent]];

In addition to what Allan said, calling -dragPromisedFilesOfTypes:... inside -tableView:writeRows:toPasteborad: is a bad idea and will cause some glitches in your program, like the message queue mysteriously freezing after the call.

If you want to do a file-promise drag to the Finder (or Path Finder, etc.) from an NSTableView, the only way to do this glitch-free is to subclass NSTableView, override -mouseDown: to handle highlighting and click-actions (which you'll have to write yourself, but it isn't as difficult as it sounds), and override -mouseDragged: to call -dragPromisedFilesOfTypes:... or implement periodic event handling, which is more difficult to do.

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >mouse pointer for drag copy (From: Adam Maxwell <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.