Article View: adobe.photoshop.scripting
Article #1773JS UI ok/cancel button problems
From: cs1212
Date: Wed, 28 Jul 2004 10:16
Date: Wed, 28 Jul 2004 10:16
18 lines
1861 bytes
1861 bytes
so ive trudged thru my first script and ive got something working despite poor writing. that now might be my problem. the ok and cancel buttons both close the window AND run the script. thru several revisions, the basic structure of the script goes -create UI (not a function) -all functions -ok/cancel.onClick methods the last lines currently read: dlg.cancel.onClick = dlg.close(); dlg.ok.onClick = main() main() is my vain attempt at mimicking the structure of the example scripts and only runs several other functions. ive tried inserting values into close(), because ive seen them in other scripts, but i cant see the difference. ive tried everything i could think of from and looked thru all the resources i could find, so it might be easier for someone to point me in the right direction than me explain all the wrong directions ive been. i could post more script, but someone would have to tell me what of 9k needs to be posted. one thing ive found interesting: using a function to list the values of all properties of an object, i find dlg.ok.onClick = undefined and dlg.cancel.onClick = onClose. if thats an easy explanation for one of you guys, id appreciate a little bit of enlightenment.
Technical Details
Message-ID:
<3bb53b8d.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Thread: f5839,5dfd726edd6f7aac,start X-Google-Attributes: gidf5839,public X-Google-Language: ENGLISH,ASCII-7-bit From: cs1212@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.photoshop.scripting Subject: JS UI ok/cancel button problems Message-ID: <3bb53b8d.-1@webx.la2eafNXanI> Date: Wed, 28 Jul 2004 03:16:15 -0700 Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit