Re: sending email
Re: sending email
- Subject: Re: sending email
- From: "Peter Sichel" <email@hidden>
- Date: Wed, 14 May 2003 15:21:38 -0400
>
Le mercredi, 14 mai 2003, ` 17:41 Europe/Paris, Quinn a icrit :
>
>
> At 11:11 -0400 14/5/03, Peter Sichel wrote:
>
>> I'm not sure what the rules are for calling an objective-C
>
>> framework from a Carbon application. The framework itself
>
>
>
> There should be no problem calling Foundation-level Obj-C code from a
>
> Carbon Mach-O on 10.1 and later. If you want to call AppKit-level
>
> Obj-C code from Carbon, you need at least 10.2.
>
>
>
>
Is there a sample code that shows how to call ObjC code from Carbon
>
Mach-O app ? I saw an example that loads Cocoa GUI which is executed
>
from Carbon app, but I don't see how I can call - (void)sendEmail from
>
a Carbon app.
If I understand Quinn's answer:
You could just redefine my "- (void)sendEmail" class method as
a stand alone C function like this:
//
// someFilename.m (use .m to invoke obj-C compiler)
//
#import <Foundation/Foundation.h>
#import <Message/NSMailDelivery.h>
void sendEmail(<some-standard-C-parameter-list>)
{
// objective C code to access Message.framework
}
Then call "sendEmail()" like any other C function.
- Peter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.