Redouane Master Cheater Reputation: 3 Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Sat May 21, 2016 4:57 am Post subject: Re: Enumerating list of Lua objects created? |
|
|
To loop through all the user-created forms, you could write something like this:
Code: | for i,v in pairs(_G) do -- use _G or _ENV
if type(v) == 'userdata' and v['getClassName'] and v.getClassName() == 'TCEForm' then print(i);
end
end |
Also, you could create the form only once in your script, and show it when the script runs (Check if the form exists, if it does, show it, otherwise, create the form and save it in a global variable, then show it).
No idea about the doNotSaveInTable flag (never found it necessary to use it)
|
|