Re: NSFilePromisePboardType
Re: NSFilePromisePboardType
- Subject: Re: NSFilePromisePboardType
- From: Peter Maurer <email@hidden>
- Date: Fri, 17 Dec 2004 10:23:47 +0100
Why don't you simply use [NSOutlineView dragPromisedFilesOfTypes: ...]
What event are you sending with that?
I'm sending [NSApp currentEvent]. But you could also explicitly store
the latest mouseDown event in your table-/outlineView subclass and use
that.
Plus the docs read that it needs
to be invoked from the mouseDown: method since that has an event to
attach it to.
Well, you can invoke it from your table-/outlineView's
-writeItems:toPasteboard: method (cf.
<http://cocoa.mamasam.com/COCOADEV/2003/03/2/59748.php>). Or you can
take over your outline view's mouseDown/mouseDragged mechanism
completely.
Even if that wasn't the case, the entire point is that
you can't put extra data on the pboard with that method. with mine all
the data you want arrives intact then you attach the file promise
stuff. Though I don't use any extra types you can easily enough
change the code to support them.
You seem to have missed the following statement from my previous
e-mail...
(...) and override your outline view's
-dragImage:at:offset:event:pasteboard:source:slideBack: method to add
any additional pasteboard type you might want to use?
Just send [pasteboard addTypes:owner:] from within your subclass's
[self dragImage:at:offset:event:pasteboard:source:slideBack:] to add
any additional types of pasteboard.
<http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/
Tasks/faq.html#//apple_ref/doc/uid/20002248/BBCFIJGF>
Sometimes reading the manual is indeed worth while... ;-D
Peter.
_______________________________________________
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