Hi!
I’m new here and looking to build my first app using corona. I have encountered a bit of a hurdle that I was unable to solve and was hoping to get some assistance or be pointed in the right direction.
I have a table and a function that populates the screen using data from the table using the following snippet ofcode:
function populate()
for i = 1,table.maxn(base),perset do
local p = display.newText(title.. " = ".. cost, \_W/4, \_H/4 + 25 \* i, system.nativeFont, 34)
end
end
Basically the function goes through a table array and creates a text field for each entry.
The problem, of course, happens when I need to run this function again to populate a new set of values from the table… it overlaps the previous text on the screen.
Now I understand that this happens because I am declaring the text field within the function… but is there any efficient way for me to clear this text? [import]uid: 48775 topic_id: 8670 reply_id: 308670[/import]