Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?
Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?
- Subject: Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?
- From: Alex Zavatone <email@hidden>
- Date: Mon, 07 Mar 2016 14:41:24 -0500
Just a formal note:
You guys are awesome.
THANK YOU.
I've got a .m file that serves as a C and Objective-C layer (glue layer?) to the library methods.
In it, I have one id that is the reference back to the object itself.
Each static C function that returns data, constructs an Objective-C friendly data type and passes it on to the C method's equivalent Objective-C partner.
This then pipes data off somewhere else and the chain drops.
Observers are set up in classes that care about the data and react to the change, taking it and storing it or further processing it as needed. If classes need to execute any of the functions within the API they can be called from Objective-C methods that wrap the corresponding C code and callbacks are handled in a block.
These C functions call the .a files' API and respond to its messages just like they are supposed to.
Now, to flesh this all out. Thanks again.
- Alex Zavatone
_______________________________________________
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