Re: C/Obj-C API Confusion
Re: C/Obj-C API Confusion
- Subject: Re: C/Obj-C API Confusion
- From: Andrew Farmer <email@hidden>
- Date: Wed, 10 Sep 2008 12:53:41 -0700
On 10 Sep 08, at 12:44, J. Todd Slack wrote:
1. Currently I have a .m and I use NSTask, NSString, etc. I would
need to change these for C, correct? What is NSTask in the C API?
Irrelevant; see below. (For reference, however, a common equivalent to
NSTask is popen().)
2. Am I confused?
Yes; see below.
3. Can one mix C and Objective-C in the same file? Maybe I can keep
the Objective-C stuff I already have done and just write the c code
for QT integration that I need? If I pass in an NSString from
AppleScript do I need to convert it a C-String?
Yes, absolutely! C and Objective-C coexist quite happily; there is
absolutely no need to stop using Objective-C just because you're using
the C API for Quicktime. Converting strings for use by the C API may
take some doing, though; see -[NSString UTF8String] for starters. (I'm
not particularly familiar with QT, though, so I don't know exactly
what format of string it wants.)
_______________________________________________
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