Quote:
Originally Posted by woodslanding
Wow, this is just rockin along!!
question: I want to create a bunch of similar items that each address a different track... I can create unique names for them by concatenating a string, but then I don't know how to access them.
|
- Accessing array elements with variables is just a matter of using []s and concatenating a string the same way.
- You can use
self inside any method that will be called with the : syntax.
Code:
for i = 0, 10 do
local ctl = GUI.elms["ns_ctl"..i]
ctl.onmouseup = function(self)
setNoteSource(self.trk, self:val())
GUI.IControl.onmouseup(self)
end
end