Lisp HUG Maillist Archive

FLI or Objective-C Interface?

Hi,

(This is a OS X specific question...)

I have a framework that is mostly C code (an Obj-C wrapper was started, 
but never finished).
Being as this is my first try at wrapping this for LW, so I'm a bit 
unsure how to start.

What is the "recommended" way to do this: FLI or the Objective-C 
interface?
My instinct is since the code is mostly C, I'm better off using the FLI.
If this is the case, how would I use read-foreign-module to load the 
framework?

If anyone can provide any additional pointers, that would be great.

Thanks,
-kevin


Re: FLI or Objective-C Interface?

On Mar 5, 2005, at 7:08 PM, Kevin Y. Kim (Lists) wrote:

> What is the "recommended" way to do this: FLI or the Objective-C 
> interface?
> My instinct is since the code is mostly C, I'm better off using the 
> FLI.
> If this is the case, how would I use read-foreign-module to load the 
> framework?

I think it just depends on your preferences and what you want to do. I 
like the Objective-C interface better. It generally requires less work 
than using the FLI.

Below is an example of loading a framework.

; need this because carbon is not loaded by default in delivery; Apple 
Help functions are in carbon
(defvar *carbon-framework-path* 
"/System/Library/Frameworks/Carbon.framework/Carbon")
(fli:register-module :carbon :real-name *carbon-framework-path*)



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Updated at: 2020-12-10 08:53 UTC