lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I do not know a lot about rtti, but is it compatible with: lua_CFunction =
> function(L: Plua_State): Integer; cdecl; Because that is the only type of
> pascal(delphi) function that is compatible with use of lua.

No. The VCL functions are not compatible. I tried to mean some functions in Lua's way (lua_CFunction) calling the VCL functions. But in an automated way (you do not have to register all object's functions by hand).

> Now we need to find a way to publish a structure to lua that represents a
> delphi class ( i believe that is what the tolua project does, but the c code
> confuses me.) i made a go at it as you can see in a previous post, but it is
> totaly not working.

Exactly. Now we have to choose the way we will follow:

1 - TRY to use the current classes or;
2 - Create new wrapper classes/functions that will handle the Lua -> Pascal -> Lua process.

And, of course, which OO we will try to emulate in Lua (heavily discussed in this mailing list :-) )



>At this point, I'm pondering about create a Pascal project like
>LuaCheia or LuaX or even a translation of the Lua to
>Pascal (which will be much easier to be done in FPC because of it's
compatibly with C). But I don't know if the work will
> be worthy it. Specially because the synchronization with Lua changes (not
so difficult using a diff tool).
I do not think that is worth te effort. A wrapper 'PascalToLua' should be
enough.

That is what i thought ;)



Romulo