Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFilePromisePboardType



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSFilePromisePboardType (From: Fredrik Olsson <email@hidden>)
 >Re: NSFilePromisePboardType (From: Nick Zitzmann <email@hidden>)
 >Re: NSFilePromisePboardType (From: The Karl Adam <email@hidden>)
 >Re: NSFilePromisePboardType (From: The Karl Adam <email@hidden>)
 >Re: NSFilePromisePboardType (From: Peter Maurer <email@hidden>)
 >Re: NSFilePromisePboardType (From: The Karl Adam <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.