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

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


  • Follow-Ups:
    • Re: NSFilePromisePboardType
      • From: The Karl Adam <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>)

  • Prev by Date: Re: Wrapping an Interactive Unix Executable (update)
  • Next by Date: NSTextFieldCell "challenge"
  • Previous by thread: Re: NSFilePromisePboardType
  • Next by thread: Re: NSFilePromisePboardType
  • Index(es):
    • Date
    • Thread