Hi all,
Just wanted to check if any one of you have used director.lua inside of a subfolder. Although I have been using Director for over a year now, I am just starting to use source files in subfolders, and get a peculiar error.
Example:
-- this line is from main.lua
-- director.lua is in root/frameworkz folder
director = require "frameworkz.director"
Corona simulator reports an error when first table function is being added to director, because apparently director variable is still nil when changeFxTime function is added to it:
-- inside of director.lua
function director:changeFxTime( newFxTime )
This doesn’t happen when director.lua is in the root folder, and now that I look at Director code I wonder how it even works in a first place, because inside director.lua functions are being added to “director” table that is defined outside of the module when module is being called.
I would imagine that “director” table is assigned a value AFTER the entire package has been read, but seems that require() function works differently when a requested module is inside of root from when its in the subfolder.
Can anyone shed some light on this ?
Thanks
Nenad [import]uid: 80100 topic_id: 24332 reply_id: 324332[/import]