Article View: adobe.scripting.indesign
Article #1168Re: [JS CS4] Why is this If Else test not working?
From: Dave_Saunders
Date: Wed, 18 Feb 2009 16:32
Date: Wed, 18 Feb 2009 16:32
7 lines
1146 bytes
1146 bytes
It can be very confusing when you use an alert like this to test an assumption. The alert code is quite smart. It knows it can only post a string to the alert dialog, so it bends over backwards to convert whatever you send it into a string. So, chances are the myReport is not a string (I've not done any actual coding with this part of the object model) but something else which when forced to a string by the alert code comes out as "None". Put a breakpoint before the alert and use ESTK's data browser to work out what's going on. Dave
Technical Details
Message-ID:
<59b7f983.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7f983.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d713958badc61099 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [JS CS4] Why is this If Else test not working? Message-ID: <59b7f983.0@webcrossing.la2eafNXanI> Date: Wed, 18 Feb 2009 08:32:59 -0800 References: <59b7f983.-1@webcrossing.la2eafNXanI> Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit