• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mouse pointer for drag copy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse pointer for drag copy


  • Subject: Re: mouse pointer for drag copy
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 29 Jul 2004 12:46:56 -0600

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.


  • Follow-Ups:
    • Re: mouse pointer for drag copy
      • From: Adam Maxwell <email@hidden>
References: 
 >mouse pointer for drag copy (From: Adam Maxwell <email@hidden>)

  • Prev by Date: Re: Bindings Blues
  • Next by Date: top vertical alignment in IB how?
  • Previous by thread: Re: mouse pointer for drag copy
  • Next by thread: Re: mouse pointer for drag copy
  • Index(es):
    • Date
    • Thread