lua-users home
lua-l archive

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


I found the same problem just before I read your response :).  Took a while though, as the reference wasn't as easy to find as I had hoped.  The modified code now Creates a new table, scans the metatable and assigns the appropriate MethodHandlers and __handlers.  For some reason simply setting the metatable of the new table didn't work, but now everything is fine.

The code used to call is simply:
ObjectInstance = TObjectName:new()
ObjectInstance:LoadFromFile(FileName)
ObjectInstance.Param = Value

In case your curious I've posted my Pas2Lua converter (witch this all came from) at: http://www.eonclash.com/pas2lua/pas2lua.zip

Not sure what was wrong with the DNS, but it should be fixed now.  Their was an error in the provider, once I changed the settings back (to the exact same ones) everything started working properly again :(

Hopefully I'll get a chance to put a page up around the converter, but until then the direct link will work :).

 - Jeremy

"Help I suffer from the oxymoron Corporate Security."


> -------- Original Message --------
> Subject: Re: More problems with classes imported into Lua
> From: Romulo Bahiense <romulo@icontroller.com.br>
> Date: Tue, April 18, 2006 6:45 am
> To: Lua list <lua@bazar2.conectiva.com.br>
> 
> In a quick eye-scan, I have only found that the 
> new_TPictureCollectionItem can be wrong. This function checks if the 
> first param is a table, and if it is not, then it is removed from stack, 
> but no other value replaces that slot.
> 
> Another possible reason: You are passing the metatable as the first 
> param, so it do pass the 'is a table' test, but it is not the instance 
> table.
> 
> I can't download the entire unit (or my DNS server wants to get me 
> angry, or your site is down), but could you post an example of Lua Code 
> showing how you call that method?
> 
> --rb