Re: Calling a Cocoa library from C
Re: Calling a Cocoa library from C
- Subject: Re: Calling a Cocoa library from C
- From: lbland <email@hidden>
- Date: Sat, 12 Nov 2011 02:39:47 -0500
hi-
On Nov 11, 2011, at 8:49 PM, Nathan Sims wrote:
> I'm unclear on how to architect this. Can a C function invoke Objc methods?
yes, however you should note that:
Cocoa is not Objective-C and technically you can not call Cocoa from C and expect the right thing to be done, unless ...
... if you want to use Cocoa from C then you need to learn how to start (run) its run loop in order to make asynchronous processing happen, including notifications, etc. as Cocoa is heavily dependent upon run loops for processing under the hood, while Objective-C is just a language that doesn't do anything.
But, yeah, if you just want to make a few Obj-C calls then no problem.
thanks!-
-lance
_______________________________________________
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