• 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: Adam Maxwell <email@hidden>
  • Date: Thu, 29 Jul 2004 15:44:23 -0500

On Jul 29, 2004, at 15:34, Nick Zitzmann wrote:

On Jul 29, 2004, at 1:48 PM, Adam Maxwell wrote:

Incidentally, I take back what I said earlier; sending an array of multiple types to the Finder caused my app to segfault on quit

That's due to a bug in Mac OS X 10.3 where, if you perform a file-promise drag with multiple files at once, then the AppKit deallocates the NSFilePromiseDragSource private class too early, causing the app to crash when the AppKit tries to re-release the class on termination. At least that's what I observed by watching the whole process in GDB.

I filed a bug report, and apparently it was a known bug.

AFAIK there is only one workaround, and it is to add this to your application's source:
[...]

Looks like you've been down this road! I might give that a try, thanks.

I also just re-introduced my bug where the files won't copy until I click the mouse in the main window. In my tableview subclass, I have this (suggested in the drag-and-drop documentation):

- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)url{

NSArray *array = [NSArray arrayWithArray:[[self delegate] namesOfSelectedFiles]];

// do this after a delay so we don't block the array receiver
[[self delegate] performSelector:@selector(copyDraggedFilesToURL:)
withObject:url
afterDelay:0.01];
// [[self delegate] copyDraggedFilesToURL:url];
return array;
}

setting a delay of 0.1 causes the program to stall, for whatever reason. If I don't use the delay, it works fine, but the Finder is useless until the copy completes. I think I'm going to comment the code so I don't mess with the delay again...

--
Adam
_______________________________________________
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>)
 >Re: mouse pointer for drag copy (From: Nick Zitzmann <email@hidden>)
 >Re: mouse pointer for drag copy (From: Adam Maxwell <email@hidden>)
 >Re: mouse pointer for drag copy (From: Nick Zitzmann <email@hidden>)
 >Re: mouse pointer for drag copy (From: Adam Maxwell <email@hidden>)
 >Re: mouse pointer for drag copy (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: mouse pointer for drag copy
  • Next by Date: troubles with tables (editing)
  • Previous by thread: Re: mouse pointer for drag copy
  • Next by thread: Re: mouse pointer for drag copy
  • Index(es):
    • Date
    • Thread