Hi, I’m trying to implement the CoronaClass type (as per https://docs.coronalabs.com/api/type/CoronaPrototype/newClass.html), which is listed as being available in the current Public release - 2015.2731. Although I am running this version, it seems like this type hasn’t been implemented yet (maybe just in Daily builds) - the example herefails with the following error: Attempt to index global ‘Prototype’ (a nil value).
Is the example wrong, or was this just prematurely listed as being available in Public?
local paramsTable = { value = 3 } local Foo = Prototype:newClass( "Foo" ) function Foo:initialize( params ) print( params.value ) end -- Pass params to initialize() which prints '3' Foo:new( paramsTable )
local paramsTable = { value = 3 } local Foo = Prototype:newClass( "Foo" ) function Foo:initialize( params ) print( params.value ) end -- Pass params to initialize() which prints '3' Foo:new( paramsTable )