Converting 7.0 window to CS3 panel using UILayout
Posted: September 16th, 2007, 7:22 am
Edit: I just realized the issue is the new addUI method added by UILayout.
It doesn't seem to work when run from the ScriptUI Panels from the windows menu.
/Edit
I have an AE7 script that creates a window, adds a variety of UI elements to it and shows the window.
This script works as is in CS3 if I launch it, but fails if I put it in the ScriptUI Panels folder to try to make it a dockable panel.
It fails at the following line.
The win object is declared like this as per Adobe's recommendation.
If its a panel it uses "this". If its run as a script, it generates a new window.
It complains that the "addUI" method doesn't exist.
I looked in the documentation and "add" is the name of the method(is this new?), so I changed it to add.
Now it complains my parameters are incorrect.
How can I change my ui building method to work as both a window and a dockable panel?
I can't get it to work as a panel at all.
Any help would be great.
It doesn't seem to work when run from the ScriptUI Panels from the windows menu.
/Edit
I have an AE7 script that creates a window, adds a variety of UI elements to it and shows the window.
This script works as is in CS3 if I launch it, but fails if I put it in the ScriptUI Panels folder to try to make it a dockable panel.
It fails at the following line.
Code: Select all
win.checkboxCreateMap = win.panelCreateCheckBoxes.addUI('checkbox', 'Map');
Code: Select all
var win = thisObj instanceof Panel ? this : new Window('palette', 'Options',[300,100,750,433]);
It complains that the "addUI" method doesn't exist.
I looked in the documentation and "add" is the name of the method(is this new?), so I changed it to add.
Now it complains my parameters are incorrect.
How can I change my ui building method to work as both a window and a dockable panel?
I can't get it to work as a panel at all.
Any help would be great.