ScriptUI in 2022
Hi guys,
As many of you, I laid my hands on "scriptui-2-16.pdf" from Peter Kahrel and use it as a bedside reading, as much as some other books from him also, as well as Laurent Tournier and Adobe.
I was surprised (I shouldn't probably by now) that some coding don't work anymore.
Can you tell me why? Is there a workaround ? Is it due to PC vs Mac ? Is it just a matter of versions and this pieces don't work anymore for good ?
Here's an exmaple. Basic test for styles applied on panels (Coming from script UI from P.Kahrel)
var scriptName = "Test";
CreateDialog();
function CreateDialog() {
// Main panels
var w = new Window("dialog");
w.grp1 = w.add ('group');
w.grp1.add('panel', [0,0,100,100], 'None', {borderStyle:'none'});
w.grp1.add('panel', [0,0,100,100], 'Gray', {borderStyle:'gray'});
w.grp1.add('panel', [0,0,100,100], 'Black', {borderStyle:'black'});
w.grp1.add('panel', [0,0,100,100], 'White', {borderStyle:'white'});
w.grp2 = w.add ('group');
w.grp2.add('panel', [0,0,100,100], 'Etched', {borderStyle:'etched'});
w.grp2.add('panel', [0,0,100,100], 'Sunken', {borderStyle:'sunken'});
w.grp2.add('panel', [0,0,100,100], 'Raised', {borderStyle:'raised'});
// Buttons
w.grp3 = w.add("group");
w.grp3.orientation = "row";
w.grp3.alignment = "center";
w.grp3.ok = w.grp3.add("button", undefined, "OK", {name:"ok"});
w.grp3.cancel = w.grp3.add("button", undefined, "Cancel", {name:"cancel"});
w.show();
}
and what it shows in my ID 17.3 (Mac)

None of the options of the panels are working.
Can someone tell me what is going on here ?
Thanks for your lights
fred
