extendscriptr icon indicating copy to clipboard operation
extendscriptr copied to clipboard

Test in Illustrator

Open ff6347 opened this issue 9 years ago • 10 comments

ff6347 avatar Apr 27 '16 11:04 ff6347

Some input on illustrator https://github.com/jtnimoy/scripting-for-illustrator-tutorial

ff6347 avatar May 04 '16 15:05 ff6347

My focus has been on Illustrator scripting ... I think I can help with this over the coming weeks. Any suggestions on testing? Anything in particular I should look out for, or is it just to generally test in Illustrator to see how it handles various features es5 and es6 in an es3 environ?

I do see there's already a test script here:

https://github.com/ExtendScript/extendscriptr/blob/f778e762428362dbf4a8f6a615ceeadd5d50a5c6/test/src/illustrator.js

I'm new t o extendscriptr, but definitely interested in helping.

mhulse avatar Aug 29 '16 03:08 mhulse

@mhulse Thanks for offering your help. It has been getting a bit quite around here. :-)

We need testing for:

extendscript specific features like:

File, Folder, $ and so on

and of course some more complex scritps like the first test we have.

On the JS side there is a lot to be done. Maybe we should take this table as basic for things we want to test --> http://kangax.github.io/compat-table/es6/

Actually every ES6 feature needs to be tested. For now we only have import and template strings in there. I would start with:

let, const, () => {}, argument defaults…

ff6347 avatar Aug 29 '16 06:08 ff6347

Awesome! Sounds good! I'll put this on my list of projects to tackle over the coming weeks! 👍

Thanks for the quick reply and details @fabiantheblind!

mhulse avatar Aug 29 '16 06:08 mhulse

Awesome looking forward to some contributions. Do you want to make a fork of the repo or work on another branch in here?

ff6347 avatar Aug 29 '16 06:08 ff6347

@mhulse added you to a team. Please don't merge right away.

  • Create a branch
  • push to it
  • make a PR against master
  • assign me for review

ff6347 avatar Aug 29 '16 06:08 ff6347

gist: https://gist.github.com/kostimarko/824078cf8853036e9a75cda980e4efb5

when Illustrator runs this script after compiling , I get this error. Screen Shot 2019-03-14 at 9 45 32 AM

kostimarko avatar Mar 14 '19 14:03 kostimarko

Hi @kostimarko would be good to open a separate issue for that. I don't have Illustrator currently installed so I can't test it right away. My guess is:

The object document.layer is not a normal Javascript array. It is a collection object which has some overlapping properties with the JS Array. If you can run a test that shows that forEach is actually not working we can investigate more.

ff6347 avatar Mar 14 '19 15:03 ff6347

@fabianmoronzirfas you're correct. It is not an array. Sorry about that.

kostimarko avatar Mar 14 '19 15:03 kostimarko

@kostimarko No problemo.

ff6347 avatar Mar 14 '19 15:03 ff6347