I am trying to create a script that generates a window and populates it with pre-made icons depending on how many
documents are opened on Photoshop. then, depending on which icon is clicked, it stacks the files in a certain way.
My question is, if i populate the window with image buttons, that are put in by a Switch, Do i put the onClick inside the
switch according to each case? or do i put it outside after the window shows?
If you're creating image buttons, you need to put the onClick where you're creating them - inside the switch, Otherwise, you will have onClick functions that don't relate to anything and will throw an error - if I understand what you're doing.