I'm trying to figure out a way to get the index of a layer inside an array, but I'm not sure what the proper syntax is.
buttons = for i in [0..4] button = new Layer
button.onClick -> print button.i print buttons
Is there any way to figure out what the position if of the button within the array?
button.onClick -> print this.index
button.name = "button_ " + i
button.onClick -> print this.name
Go drunk Thomas you're home
index - 1