• 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: Sending data from contextual menu plugin to Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending data from contextual menu plugin to Cocoa app


  • Subject: Re: Sending data from contextual menu plugin to Cocoa app
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 17 Dec 2007 16:13:11 +0100


Le 17 déc. 07 à 15:30, Aaron Vegh a écrit :

Hi there,
I'm writing an application that has two separate utilities: a main
Cocoa app, and a contextual menu item. I'd like the contextual menu
item to allow the user to select files for processing in the Cocoa
app; it would deliver the file's path into the Cocoa app.

However, as I've learned, contextual menu plugins are written in
straight C (see http://www.mactech.com/articles/mact...ins/index.html
for a tutorial). Ultimately you get down to the essential problem:
what C function will take a path name and fork it over to a Cocoa app?

I hope this is clearly explained... I barely understand hte problem
well enough to phrase a proper Google search! Further explanation
forthcoming if required.

Thanks,
Aaron.



You can call Cocoa code into a Contextual Menu plugin.

Just be sure to bracket your Cocoa call into autorelease pool

ContextualMenuCallBack(args) {
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

	/* You obj-c code here */
	NSTask *task = [NSTask task......];

	[pool release];
}

_______________________________________________

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: Sending data from contextual menu plugin to Cocoa app
      • From: "Aaron Vegh" <email@hidden>
References: 
 >Sending data from contextual menu plugin to Cocoa app (From: "Aaron Vegh" <email@hidden>)

  • Prev by Date: Re: CoreData huge memory usage - is this right ?
  • Next by Date: Re: Sending data from contextual menu plugin to Cocoa app
  • Previous by thread: Sending data from contextual menu plugin to Cocoa app
  • Next by thread: Re: Sending data from contextual menu plugin to Cocoa app
  • Index(es):
    • Date
    • Thread