PDA

View Full Version : Pas2Lua Beta 1 Released



jdarling
17-04-2006, 09:57 PM
I've finally got Pas2Lua to a jello like stage. I managed to successfully import the unDelphiX objects along with many of the Delphi VCL and RTL libraries. I call it Jello because a few things are missing; Array properties are not supported, Multiple levels of objects are not supported (IE: MyImage.Canvas.Draw() will blow up), Overloaded methods are not fully supported (they will build down, but then you have to either merge them or give them unique names), Inheritance isn't handled automatically (you have to cut and paste the methods from the parent classes, properties are supported via RTTI).

The things that are supported:
Reads in standard pascal source files and scans for objects
Creates wrappers around the objects that it finds
Creates consts for class name to lua class name association (so you can change from TPictureCollectionItem to TImage if you so wish)
Handles .Free or uses Garbage Collection if you don't free objects
Wraps all Published properties, doesn't handle public properties (yet)

You can download it from: http://www.eonclash.com/pas2lua/pas2lua.zip

Please give feedback (here or at eonclash.com) if you use it. I know that you have to hand tweak some of the code it generates (if for example you want to use TRects), but for the most part it generates all of the teadious code. Simple objects should import w/o any need of tweaking.

savage
18-04-2006, 08:15 AM
Sounds great, I wish I had the time to try it.

PS. I have upgraded your post to, News item.

jdarling
18-04-2006, 12:55 PM
Sounds great, I wish I had the time to try it.

PS. I have upgraded your post to, News item.

Thanks for the News Item upgrade, now I guess I just have to hope that their arn't too many bugs :)