I was checking the variables in my game and I noticed that there is a global variable called ‘TextHighlight’. After a lot of searching I found it was being created right after calling widget.newButton() to build a custom buttom. I ran a search on my project and I don’t have any variables called TextHighlight.
If I roll back to daily build 1043 the variable is not there at the return statement below, if I update to build 1049 or higher (currently using 1072) then the global variable is there.
I am using Lua Glider 1.7.2 as my IDE
I doubt the variable is causing any problems but I am curious about it, and I really don’t like having global various lingering.
Here is the code that is creating the button:
[lua]
local getButton_basic = function( listenerFunction )
local button
if listenerFunction then
button = widget.newButton{left = screenWidth*0.35, top = screenHeight*0.4,
width = screenHeight*0.2, height = screenWidth*0.2,
defaultFile = graphicsPath…“button_normal.png”,
overFile = graphicsPath…“button_pressed.png”,
onEvent = listenerFunction }
else
button = widget.newButton{left = screenWidth*0.35, top = screenHeight*0.4,
width = screenHeight*0.2, height = screenWidth*0.2,
defaultFile = graphicsPath…“button_normal.png”,
overFile = graphicsPath…“button_pressed.png” }
end
return button
end
[/lua]
Any clues as to what this is would be great. My guess is that it’s just a minor bug in Corona’s code, since I don’t see any other globals coming from the API (besides physics).
Thanks!
-Treb