Adding elements to a Dialog after it's been created using a resource string
I can add elements using add but not with a resource string.
The following works in ExtendScript Toolkit but not in Photoshop. Any idea why?
var window_res = "dialog { \
orientation: 'row', \
alignChildren: 'top', \
preferredSize: [500, 500], \
}";
var btnPnlResource = "Panel { \
orientation:'row', \
text: 'Build it', \
testBtn: Button { text:'Test' }, \
buildBtn: Button { text:'Build', properties:{name:'ok'} }, \
cancelBtn: Button { text:'Cancel', properties:{name:'cancel'} } \
}";
var w = new Window(window_res, 'Testing');
w.panel = w.add(btnPnlResource);
w.show();
The error I'm getting is Server Interface error "
As a side note: I copied the code from Javascript Tools Guide but I had to remove ""btnPnl: " from the beginning of the btnPnlResource string. Otherwise you get "btnPnl: is unknown or invalid in this context" error.
