Giter VIP home page Giter VIP logo

Comments (3)

cameronmcefee avatar cameronmcefee commented on May 13, 2024 5

I've run into this myself. I have not seen documentation to prove this, but it appears Illustrator is persistent by default (not sure if that can be turned off). If you're using the remote debugging (.debug file) method, you can hard refresh (cmd/command + r) in Chrome, which will reload your html panel. If you're using something like livereload in your plugin, this will be effectively the same as non-persistence, as the panel will refresh when you flip back to Illustrator.

However, I've noticed with this method, if you've called an ExtendScript file in your manifest.mxml file with <ScriptPath>./myfile.jsx</ScriptPath>, this is only initialized at panel startup, so when your panel reloads it will not reload that file. I've gotten around this by omitting ExtendScript files from the manifest and loading them at runtime in the JavaScript like so:

var CSI = new CSInterface();
var mainJXS = CSI.getSystemPath(SystemPath.EXTENSION) + "/myfile.jsx";
CSI.evalScript( "$.evalFile('" + mainJXS +  "');" );

Take note of the single quote in the evalScript string. This is necessary to ensure that the path to the ExtendScript file is passed as a string. Otherwise it'd be evaluated like (myfile.jsx) which will throw an error.

Please note: I'm writing this about 5 minutes after figuring out that it works. There may be hitches. I've noticed that running (new File($.fileName)).parent in the ExtendScript included in the manifest returns a relative path / while the ExtendScript included via the evalScript method returns the absolute file path. I haven't yet determined if there will be other context-specific ramifications.

from cep-resources.

plugisto avatar plugisto commented on May 13, 2024

This worked for me with Illustrator CC2018.
It is really sad that Adobe / Illustrator team has no motivation to fix this.
(In Photoshop this is no issue)

from cep-resources.

inertlab avatar inertlab commented on May 13, 2024

thank you cameron, i hadn't added any new features to my extension because reloading has been a total drag. this worked for me.

from cep-resources.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.