• 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
Reading from the draggingPasteboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading from the draggingPasteboard


  • Subject: Reading from the draggingPasteboard
  • From: Stefan Reindl <email@hidden>
  • Date: Thu, 24 Mar 2005 14:52:28 +0100

Hi everyone,

I can“t figure out how to read a string from the draggingPasteboard. I implemented a subclass of NSImageView and made it the dragging destination. So far, everything works just fine, I drag a file on it and the NSLog output gives me the path of the file.

Now I want to read out the pasteboard content in a subclass of NSWindow but the following code gives me a warning (NSPasteboard may not respond to +draggingPasteboard).

How can I get the filepath from the pasteboard?

- (IBAction) copyFileIntoBundle:(id)sender {

NSPasteboard *pboard = [NSPasteboard draggingPasteboard];
NSArray *filenames = [pboard propertyListForType:NSFilenamesPboardType];

NSLog(@"performDragOperation: filenames: %@", [filenames description]);
[...]
}

TIA
Stefan
_______________________________________________
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: Reading from the draggingPasteboard
      • From: Guy English <email@hidden>
  • Prev by Date: Basic Cocoa Bindings in Java
  • Next by Date: Re: [OT] Application ideas
  • Previous by thread: Basic Cocoa Bindings in Java
  • Next by thread: Re: Reading from the draggingPasteboard
  • Index(es):
    • Date
    • Thread