Forum > General
Lua as Scripting Language, Troubles...
(1/1)
Hydexon:
Hello. I am making good in this of FreePascal and i want know how to add an scripting engine in my programs, i decided to use Lua because my programs must be strictly crossplatform, but were i use the Pascal Headers for embed Lua Libs as a problem: Only register functions or procedures, i want of lua modify properties of the form and create new forms or dialogs as pascal script can do, i have an simple solution creating harder functions for alteration.
P.D: Is possible load forms from LFM files at Runtime?
Some help please, Thanks
Leledumbo:
--- Quote ---i want of lua modify properties of the form and create new forms or dialogs as pascal script can do
--- End quote ---
Surely it can. What's the problem? Anyway, for better integration with Object Pascal, I suggest using pLua wrapper instead of the default shipped one.
--- Quote ---Is possible load forms from LFM files at Runtime?
--- End quote ---
If you know how it's loaded, theoritically yes. In newer (>= 0.9.29) approach, it's compiled as a resource in your executable, while latest stable and previous one adds the LFM as string to LazarusResources. The wiki has information about Lazarus resource (but I believe you'll need to experiment yourself).
Hydexon:
--- Quote ---Is possible load forms from LFM files at Runtime?
--- End quote ---
I'm referring if is possible load LFM Files at Runtime FROM EXTERNAL FILES
marcov:
--- Quote from: Hydexon on January 28, 2011, 12:14:47 am ---
--- Quote ---Is possible load forms from LFM files at Runtime?
--- End quote ---
I'm referring if is possible load LFM Files at Runtime FROM EXTERNAL FILES
--- End quote ---
In theory that is also possible, just more work.
Leledumbo:
Have a look at component streaming example to give you an idea. If you've got it, now you need to know how load it from lfm instead of xml... (I haven't seen any examples, so you maybe have to dig in LCL code).
Navigation
[0] Message Index