@Idurniat
Yes, it is valid and in accordance with the documentation guidelines, as far as I know. I do get a warning (and hence this post) but there are no errors, and my app functions without any problems.
@sdktester15
Here is my code
Config.lua
local d = require("data") local aspectRatio = display.pixelHeight/display.pixelWidth local h, class if (aspectRatio \< 1.34) then -- iPad h = 426 d.setClass("A") elseif (aspectRatio \< 1.61) then -- Kindle Fire HD h = 512 d.setClass("B") elseif (aspectRatio \< 1.67) then -- Nexus One, Nokia Lumina h = 533 d.setClass("C") elseif (aspectRatio \< 1.71) then -- Kindle Fire, Samsung Galaxy Tab h = 546 d.setClass("D") else -- iPhone, Samsung Galaxy, Amazon Fire, Ouya, etc. h = 568 d.setClass("E") end application = { content = { width = 320, height = h, scale = "zoomEven", xAlign = "center", yAlign = "center", imageSuffix = { ["@2x"] = 1.5, ["@3x"] = 2.5, ["@4x"] = 3.5 }, fps = d.fps, }, }
Data.lua
local D = {} D.fps = 30 function D.setClass(class) D.class = class end --[[some other irrelevant code --]] return D