"squirreltown" wrote:
I have an array of aa's that are a part of a settings screen, 20 different buttons that do different things. I'm calling a function from each button. In the below Autopaint is a function being called.butts = []
button={title:"RUN DEMO" , action:AutoPaint, sec:"demo", } : butts.Push(button)
butts[index].action(varr, m )
You can see, this way requires me to have the same function parameters for all the buttons. I can of course get around this in a clunky way using the button index, but I'm wondering if there is a slick way that allows me to put the function parameters in the array somehow?
Thanks
What exactly are you trying to achieve? You
could pre-cache all the arguments if they will always be the same for all button actions.