Changes between Version 3 and Version 4 of documentation/LuaManual/PythonDifferences

Show
Ignore:
Author:
gambini (IP: 75.131.38.166)
Timestamp:
06/09/12 06:53:39 (5 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • documentation/LuaManual/PythonDifferences

    v3 v4  
    1717[wiki:documentation/LuaManual/Colours Colourb and Colourf] in Lua have a ''rgba'' property, where Python does not. 
    1818 
    19 Lua has no classes, and casting from one type to another is important. Casting an ''Element'' to one of its child classes is proved through the ''Element.As'' table. To convert an ''Element'' named ''ele'' to a child type (in this case, ''Document'') looks like `local doc = Element.As.Document(ele)`. No casting functionality is provided for other types
     19Lua has no classes, and casting from one type to another is important. Casting an ''Element'' to one of its child classes is provided through the ''Element.As'' table. To convert an ''Element'' named ''ele'' to a child type (in this case, ''Document'') looks like `local doc = Element.As.Document(ele)`. Any type whose name starts with ''Element'' (with the exception of ''Document'', which is short for ''ElementDocument'') will have a function in the ''Element.As'' table for casting
    2020 
    2121The ''Log'' type/function is not defined in the ''rocket'' table like it is in Python. To print to the Log explicitly, you must call ''Log.Message''. The global Lua function 'print' has been adapted to output to the Log, and otherwise acts the same as the vanilla "print" function.