PDA

View Full Version : UI Scripting - populating variables


dwigfor
02-14-2008, 11:55 PM
Hi all.

I've now moved onto UI creation... What I would like to do is create edittext boxes, which would populate my variables.. I'm having a problem on my first attempt..

// Add a panel to contain the components
win.pnlA = win.add("panel", [10, 10, 400, 450], "Settings");

win.pnlA.displayTextLbl = win.pnlA.add("statictext", [10, 415, 100, 430], "XML Name:");
XMLName = win.pnlA.add("edittext", [100, 415, 225, 430], 'XMLTest5');

var logFile = new File("/c/TEMP/" + XMLName + ".xml");

Most of the rest of the script creates lots more static and edit texts with other panels... My problem is, I'm not sure how to get the result of the edittext (in my example, XMLTest5) to appear in the variable/filename. My filename is unwantingly written as [object EditText].xml

Thanks again for your help.
-Dave

dwigfor
02-15-2008, 07:13 PM
Got a reply on the Adobe forum....


http://www.adobeforums.com/webx/.3c062062/0
In order to access the edittext values, you need to add .text after the variable.. So, in my case I needed:
var logFile = new File("/c/TEMP/" + XMLName.text + ".xml");

Thanks again, Jeff!

CGTalk Moderation
02-15-2008, 07:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.