-
Adding buttons to a UI panel from that UI panel stopped working in AE19 – works in 18
Hey guys,
I have a little UI panel with several buttons.
One of these buttons should check some layers, and possibly add a new button to the UI.
This always worked perfect in AE18 and before, but stopped working in AE19.I used this to add the button:
var button = myPanel.grp.groupTwo.add("button", [1, 1, 80, 20], layerName);The actual group the button should be added to is created here, and works for the buttons actually added in the extendscript itself:
res = "group{orientation:'row', spacing:0, margins:[0,0,0,0],\
groupOne: Group {orientation:'column', alignment:['left','top']}groupTwo: Group {orientation:'column', alignment:['right','top']},\
}";//UI elements
myPanel.grp = myPanel.add(res);
//dd = myPanel.grp.groupOne.add("dropdownlist", undefined, myList);
//var applyButton = myPanel.grp.groupOne.add("button",[10,10,180,30],"apply ddl");
var newScaleButton = myPanel.grp.groupOne.add("button", [1, 1, 80, 20], "new scale");
//var subsButton = myPanel.grp.groupTwo.add("button", [1, 1, 80, 20], "subs");
var vertButton = myPanel.grp.groupTwo.add("button", [1, 1, 80, 20], "vert pos");
var firstName = myPanel.grp.groupOne.add("button", [1, 1, 80, 20], "first name");
var lastName = myPanel.grp.groupTwo.add("button", [1, 1, 80, 20], "last name");The debugger highlights the row where the button is added and says “undefined is not an object”.
Something has changed in AE19 Extendscript, but I have no idea what, nor do I know what method I should use to add buttons in ae19 since the debugger is no help at all.Does anyone know what could have changed?
ps. the code still works perfectly in AE18.