Creating objects in a loop and a question about buttons

Hi !

I have a poll app to make for iPad. For each question, there are 5 choices, depending on the satisfaction of the user.
In fact, for the 28 questions, I made 28 times the same code because I didn’t manage to create the objects in a loop with something like “eval()” in actionscript :

[lua]for i=1,28,1 do
–creation of the objects : “question_1”, “question_2”, “question_3”…“question_28”
end[/lua]

Any idea ?
My second question is : is it possible to pass parameters in a function on the onPress event of a ui.newButton ? For the moment, I make a temporary function with specify the parameter I want for my final function, not very proper code…
Thanks in advance for your answers !!
[import]uid: 6149 topic_id: 3003 reply_id: 303003[/import]

This might be a bit too late, but you can have a read of this which will kind of answer your questions here.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 3003 reply_id: 56806[/import]