CSUIB is a very handy tool that let's you create UIs for CS/CS2 with a UI editor. It generates resource specifications that look like this:
Code: Select alldialog { text: ‘Alert Box Builder’, bounds:[100,100,480,490], \
msgPnl: Panel { text: ‘Messages’, bounds:[25,15,355,130], \
titleSt:StaticText { text:’Alert box title:’, \
bounds:[15,15,105,35] }, \
clipped
Resource specifications are discussed on page 18 in the CS JS Guide and page 197 in the CS2 Guide.
The documentation shows this code as proper usage of resource descriptors:
Code: Select allvar alertBuilderResource =
“dialog { text: ‘Alert Box Builder’, bounds:[100,100,480,490], \
msgPnl: Panel { text: ‘Messages’, bounds:[25,15,355,130], \
titleSt:StaticText { text:’Alert box title:’, \
bounds:[15,15,105,35] }, \
//clipped
var win = new Window(alertBuilderResource);
win.show();
However, having string literals span lines like this (with a '\' character) is not standard JS. The standard way would be to do this:
Code: Select allvar alertBuilderResource =
“dialog { text: ‘Alert Box Builder’, bounds:[100,100,480,490], \n" +
"msgPnl: Panel { text: ‘Messages’, bounds:[25,15,355,130], \n" +
"titleSt:StaticText { text:’Alert box title:’, \n" +
"bounds:[15,15,105,35] }, \n" +
//clipped
var win = new Window(alertBuilderResource);
win.show();
The reason I bring this up is that if you use other tools to view and/or modify your source code, like xemacs or eclipse, you may run into problems with this particular extension since it won't parse correctly.
BTW, the '\n' is there in case I need to write the resource out to file. You should be able to leave it out with no ill effects.
CSUIB generated code
CSUIB generated code
I have tried this and I cannot get the dialog to work. Can you show a segement of code that has not been clipped.
I really want to use the CSUIB to create dialogs.
I really want to use the CSUIB to create dialogs.