• 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: CFPasteboardResolveAllPromisedData crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFPasteboardResolveAllPromisedData crash


  • Subject: Re: CFPasteboardResolveAllPromisedData crash
  • From: David Kocher <email@hidden>
  • Date: Tue, 1 Feb 2005 00:47:14 +0100

I have now solved the 'slide back' image problem by returning a transparent 'placeholder' image (although returning nil does also work but gives some error messages as it can't render the picutre as there is no data) in the dragImageForRows: method.

- (NSImage *)dragImageForRows:(NSArray *)dragRows event:(NSEvent *)dragEvent dragImageOffset:(NSPointPointer)dragImageOffset {
return [[NSImage alloc] initByReferencingFile: @"transparent.tiff"];
}


For whatever reason I get a
	Can't cache image
error message in the console.log

-dk

On 31. Jan 2005, at 18:14, Adam Maxwell wrote:


On Monday, January 31, 2005, at 08:08AM, Nick Zitzmann <email@hidden> wrote:



On Jan 31, 2005, at 8:29 AM, David Kocher wrote:

While searching for this problem in the archives I also found the
discussion about the 'frozen' message queue problem described in this
[ http://www.cocoabuilder.com/archive/message/cocoa/2003/5/15/81424 ]
thread which I can't solve proberly as well because of the slideback
'table row image' drawn when returning YES from
tableViewWriteRowsToPasteboard:. Is anyone out there who knows a
solution for this by now?

The only solution for the message queue freeze problem that does not
involve using private APIs is to subclass NSTableView, override
-mouseDown:, and rewrite almost all of the functionality of the method.
Which means it'll have to handle selecting rows and sending single and
double-click actions. This breaks NSTableView's periodic event
handling, so -mouseDragged: will be called when the mouse is dragged,
and there you can begin the file-promise drag. If you begin a
file-promise drag in -mouseDragged:, then the message queue will not
freeze.


Warning: This will probably also break the NSTableView -clickedRow
method.

We've all filed bugs on this, right? Overriding -mouseDown: for NSTableView is insane if you want to preserve all of the proper selection/dragging behavior.

Someone else in this group also figured out a way of doing this that doesn't involve overriding -mouseDown:, but does involve dependence on private AppKit APIs. I don't recommend doing this, but the message should be in the archives.

I did it without using private API or overriding -mouseDown:, so it can be done (the basic solution I used should be in the archives as well). It's not what the documentation recommends, but at least it works.


--
Adam


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >CFPasteboardResolveAllPromisedData crash (From: David Kocher <email@hidden>)
 >Re: CFPasteboardResolveAllPromisedData crash (From: Nick Zitzmann <email@hidden>)
 >Re: CFPasteboardResolveAllPromisedData crash (From: David Kocher <email@hidden>)
 >Re: CFPasteboardResolveAllPromisedData crash (From: Nick Zitzmann <email@hidden>)
 >Re: CFPasteboardResolveAllPromisedData crash (From: Adam Maxwell <email@hidden>)

  • Prev by Date: More NetSocket problems...
  • Next by Date: + initialize docs conflict?
  • Previous by thread: Re: CFPasteboardResolveAllPromisedData crash
  • Next by thread: help with NetSocket
  • Index(es):
    • Date
    • Thread