• 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: Drag'n Drop Mail.app message to Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag'n Drop Mail.app message to Cocoa app


  • Subject: Re: Drag'n Drop Mail.app message to Cocoa app
  • From: John Ackert <email@hidden>
  • Date: Wed, 4 Aug 2010 23:35:43 +0200

any ideas?

~John

On Jul 22, 2010, at 7:04 PM, John Ackert wrote:

> Hi,
>
> how can I accept a dragged message from Mail.app into a NSTableView and how can I read the message's content?
> I receive the message URL in form of message:<Message-ID> when I use  NSURLPboardType as in the following example.
>
> - (void)awakeFromNib
> {
> 	[tableView registerForDraggedTypes:[NSArray arrayWithObjects: NSURLPboardType, nil]];
> }
>
> - (BOOL)tableView:(NSTableView*)inTableView
>       acceptDrop:(id <NSDraggingInfo>)inInfo
>              row:(int)inRow
>    dropOperation:(NSTableViewDropOperation)inOperation
> {
> 	NSPasteboard *thePastboard = [inInfo draggingPasteboard];
>
> 	NSString *type = [thePastboard availableTypeFromArray:[NSArray arrayWithObjects: NSURLPboardType, nil]];
>
> 	if ([type isEqualToString:NSURLPboardType]) {
>        	NSURL *url = [NSURL URLFromPasteboard: thePastboard];
> 	        NSLog(@"URL: '%@'", url);
>    	}
> 	return YES;
> }
>
> However,  I  don't have an idea what to do next? Scripting Bridge?
> Or is there another way how to accept and read email content?
>
> Thanks,
> John Ackert_______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Drag'n Drop Mail.app message to Cocoa app
      • From: Mark Ritchie <email@hidden>
  • Prev by Date: Re: iOS: UITableViewCell an textlabel?
  • Next by Date: Re: Need help understanding first responder and multiple nibs
  • Previous by thread: NSHTTPCookieStorage
  • Next by thread: Re: Drag'n Drop Mail.app message to Cocoa app
  • Index(es):
    • Date
    • Thread