[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: NCLua canvas module implementation: Silly question
- From: Ezequiel García <elezegarcia@...>
- Date: Sun, 8 Jan 2012 21:05:52 -0300
2012/1/8 Duncan Cross <duncan.cross@gmail.com>:
>
> Try first removing the module('canvas') line (module() is not useful
> in situations like this, where you are constructing your own object
> and returning it at the end), and then setting the global variable
> yourself at the end, e.g.:
>
> -- Create base instance
> local baseInstance = Canvas.newcanvas(otherModule:CreateSurface
> {caps='DSCAPS_PRIMARY|DSCAPS_FLIPPING'})
> _G.canvas = baseInstance
> return baseInstance
>
> -Duncan
>
Sounds like a sensible solution. Thanks.