Copy link to clipboard
Copied
I'm trying to set up a simple dialog just to understand how tabbed panels work, here's my code:
]var ADAPTwinResource =
"dialog { \
properties:{ \
resizeable:false, \
closeButton:false \
}, \
preferredSize: [100, undefined], \
text: 'Test Dialog', \
frameLocation: [100,100], \
pnl1: TabbedPanel { \
tab1: Tab { \
properties:{ \
text:'Tab 1' \
} \
}, \
tab2: Tab { \
properties:{ \
text:'Tab 2' \
} \
} \
} \
}";
var ADAPTwin = new Window(ADAPTwinResource);
ADAPTwin.show();
This gives me an error of:
"Bad Argument: Invalid Resource Format"
I'm at a loss to find the error. Can anyone help me figure out where I'm going wrong? I'm a simple SIMPLE dialog at this point.
Copy link to clipboard
Copied
Any reason why you want to do this in 'resource string style'…?
Copy link to clipboard
Copied
That's my preffered method of generating dialogs. I've been able to create TabbedPanels otherwise, but I'd like to know why it isn't working in resource specification.
Copy link to clipboard
Copied
I'm getting the same problem, ie it works using add but not in a resource string.
Can someone from Adobe confirm that this is indeed a bug?
Copy link to clipboard
Copied
I ran across this trying to figure out the same problem.
I finally found a thread which answered it.
Your code, corrected:
var ADAPTwinResource =
"dialog { \
properties:{ \
resizeable:false, \
closeButton:false \
}, \
preferredSize: [100, undefined], \
text: 'Test Dialog', \
frameLocation: [100,100], \
pnl1: Panel {type:'tabbedpanel', \
tab1: Panel { type:'tab',\
text:'Tab 1' \
}, \
tab2: Panel {type:'tab',\
text:'Tab 2' \
} \
} \
}";
var ADAPTwin = new Window(ADAPTwinResource);
ADAPTwin.show();
Copy link to clipboard
Copied
Thank you, Kenneth. That certainly worked for me but it seems to be a work-around for now.
This documentation on ScriptUI control objects clearly states that tabbedpanel is a container with its own set of properties and yet is not recognized as a valid resource format.
https://estk.aenhancers.com/4%20-%20User-Interface%20Tools/control-objects.html
Even LatteUI.jsx could not support it as a declared noun. Surely, this must be a bug.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now