dynamic buttons
I am trying to create a bunch of buttons in a FOR loop. What is the best practice to go about doing this? I need to be able to change the button text outside the loop in another function.
Code:
|
What you're doing is fine. Are you having issues?
|
Well going further I have several objects I create in the loop along with the button. I wanted to keep them together in a structure of some sort. For example:
Code:
local node = {} Code:
local node = {} |
Quote:
If you want to use tables, you need to declare them properly, here's two approaches: Lua Code:
(Disclaimer, code is untested and might contain errors) http://www.lua.org/pil/2.5.html |
Add local in front of each thisnode assignment.
|
Thanks that really pointed me in the right direction for what I needed
|
All times are GMT -6. The time now is 10:20 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI