TLC, a tiny lua cocoa bridge
gist.github.com
gist.github.com
What I found instead is beautiful.
Can you load a framework with this? I know hardly anything about Objective-C.
I haven't tried using TLC from the standalone luajit interpreter, but in that case you would probably have to use fii.load() to load the Framework & libobjc before being able to use objc. But that is not what it was designed for
To translate a LuaCocoa example you'd in most cases just have to add objc_loadClass calls for any class you want to use, and use dots instead of colons to call methods (obj:method() -> obj.method() ).
It doesn't support subclassing objective-c objects so that would probably limit you if you tried to write your app exclusively in lua.
And from what I can tell, iphonewax is intended for writing entire apps in lua, this project is intended to be used when embedding bits of lua code in your objc app. (But there's nothing stopping you from writing most of your app in it)
if ffi == nil then
ffi = require("ffi")
end
is suggestive. ffi = ffi or require("ffi")
If the ffi expression evaluates to something that is not nil, we keep the previous value of ffi. The assignment becomes a no-op.If it evaluates to a nil, we initialize it by calling require().