Re: ContextualMenus and app launch question
Re: ContextualMenus and app launch question
- Subject: Re: ContextualMenus and app launch question
- From: Chris Pavicich <email@hidden>
- Date: Tue, 27 Apr 2004 08:29:44 -0400
Daniele:
I am not quite sure that I follow your question, but I am willing to
try to lend a hand (I am also working on some Finder CM stuff). I am
also not too familiar with CMWS.
So this may be of little value. You should be able to call into your
framework directly from your plugin code.
Steps to do this:
1. Import the header for your framework in the CM code.
2. If necessary create an NSAutoreleasePool, this should probably be
done at the top of the method you are calling from.
3. Use the objects in your framework as your normally would. (alloc,
init, invoke methods, etc)
4. At the end of the CM method, do [pool release].
#import "MyFrameworkHeader.h"
static OSStatus YourPluginExamineContext(void* thisInstance, const
AEDesc* inContext, AEDescList* outCommandPairs)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MyClass *someClass = [[MyClass] alloc] init];
[someClass someMethod];
[pool release];
return noErr;
}
Sorry this doesn't directly answer the question at hand (argument
passing), but it seems like you are headed down the wrong path
(potentially).
HTH,
CMP
On Apr 27, 2004, at 6:56, daniele wrote:
Hello,
I've developed a small cocoa framework. Now, using the Contextual Menu
Workshop (1.5) project i've createad a Finder CM plugin. CMWS is
developed using C/C++ and Carbon API so i don't know how to call my
framework (alloc a new class, call objc commands and so on). So I've
decided to make a third small cocoa app to call (this app will call my
framework and execute some tasks). The question is: how can I call a
cocoa app and pass to it two parameters directly from a Carbon/C++
App?
Thanks
Daniele
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.