Article View: adobe.acrobat.sdk
Article #252Acrobat cache?
From: batevenci
Date: Mon, 23 Mar 2009 08:21
Date: Mon, 23 Mar 2009 08:21
8 lines
1814 bytes
1814 bytes
We call a javascript function from a plug-in. On most of the computers this works without any problems. But on the two production machines, that we used to develope the plugin and javascript, we get different errors. Since the javascript function calls some secure functions, we used app.trustedFunction and app.beginPriv/app.endPriv functions.
One of the errors we get is that the "this" keyword isn't being recognized. Means we can access the active document through "this" in most parts of the function, but inside a secHandler.login ... secHandler.logout block the "this"-keyword doesn't represent the active document anymore. After the logout it does again. I guess it becomes something else, but can't figure what exactly.
If we create a menu item for the function with a javascript from the javascripts folder, and execute our plug-in we won't get any errors. Now the strange part is that even if we delete everything from this menu.js and leave just some arbitrary comment in the file, everything works fine. Like mentoned this only happens on the production machines, so something has to be cached
some probably relevant info:
- from the plug-in we call the js function as follows:
strcpy_s ( jsscript, "event.value=myFnc();");
AFExecuteThisScript ( pdDoc, jsscript, NULL);
Technical Details
Message-ID:
<59b86146.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: 10177e,8fed1f4e095ebd97,start X-Google-Attributes: gid10177e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: batevenci@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.acrobat.sdk Subject: Acrobat cache? Message-ID: <59b86146.-1@webcrossing.la2eafNXanI> Date: Mon, 23 Mar 2009 01:21:21 -0700 Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit