Re: calling cocoa method inside carbon function...
Re: calling cocoa method inside carbon function...
- Subject: Re: calling cocoa method inside carbon function...
- From: James Chen <email@hidden>
- Date: Tue, 13 Jan 2004 09:31:28 +0800
Hi,
I think you should wrap the cocoaObject up first since the carbon
function resides in file with extension c or cpp (which is not .m).
And the wrapper should be implement in .m or .mm file (same as the
cocoaObject will be fine):
void CallCocoaObjectMyMethod(CocoaObjectClass *inCocoaObject)
{
[inCocoaObject myMethod];
}
Then your carbon function:
void myCarbonMethod()
{
CallCocoaObjectMyMethod(cocoaObject);
}
Hope this works,
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
On Jan 12, 2004, at 9:48 AM, Jacob Chapa wrote:
I have a self defined carbon function and I want to call a cocoa
method from it.
I know I can make carbon calls from cocoa methods, i.e:
- (void) myCocoaMethod
{
CarbonCallhere():
}
but I cant do something like this:
void myCarbonMethod()
{
[cocoaObject myMethod];
}
is there a workaround to this?
The carbon method being called is a callback function and I am trying
to use a cocoa speech object inside of it.
Thanks a lot
_______________________________________________
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.