Skip to main content
oliverIntergrafika
Inspiring
March 20, 2016
Answered

Generator-core getting started

  • March 20, 2016
  • 1 reply
  • 1475 views

I decided to upgrade my extension with real time asset exporting, with the help of generator-core.

I have installed, configured everyting and dowloaded the:

GitHub - adobe-photoshop/generator-getting-started: Adobe Generator Getting Started Tutorial. Scripting Photoshop with J…

The generator-getting-started-master is crashing when I try to CTRL+T (transfrom) a layer with the following message: Error trace: TypeError: Cannot read property 'id' of null at Generator.handleToolChanged... If I comment the Tool handling out it is working fine.

But I have one Question: Why the "imageChanged" event is firing only once when I nudge a layer with the Move tool? It dispatching only at the first cursor key press.

Or two:

Is there a dedicated forum about generator?

Thanks a lot!

This topic has been closed for replies.
Correct answer matias.kiviniemi

I recommend to start with printing all event data to console and see what you're getting in different scenarios. For example imageChanged can have a multitude of different shapes from file save to reordering to content changes. On element move it should fire on "every nudge" (I checked my code), you might have some other issue.

There is also a Google Groups forum which I've used mainly for bug reporting.

Google Groups

1 reply

matias.kiviniemi
matias.kiviniemiCorrect answer
Legend
March 20, 2016

I recommend to start with printing all event data to console and see what you're getting in different scenarios. For example imageChanged can have a multitude of different shapes from file save to reordering to content changes. On element move it should fire on "every nudge" (I checked my code), you might have some other issue.

There is also a Google Groups forum which I've used mainly for bug reporting.

Google Groups

oliverIntergrafika
Inspiring
March 20, 2016

Hi Matias,

Thanks for the Google group address!

Do you have any idea what can be an other issue? I have no clue. I am trying to fix this behaviour since hours without success. As I remember the imageChanged event worked fine at first. I was able to print out the strigified document with changing bounds at every cursor keypress.

I have tried to install the whole stuff on an other machine. Reinstall the latest nodeJS, redownload the latest generator-core. No success, the event only coming at the first time. I have no clue....

I will ask my friend to check out this problem, because I think its a mysterious virus in my gigabit switch

matias.kiviniemi
Legend
March 20, 2016

Does it happen also if you drag with a mouse or do individual nudges (i.e. not holding down the arrow key)? Holding the key down is potentially one of those things you have to consider a bit: how do you handle it if events stack up or come late. I.e. one issue could be (if you process & write files) that you're not ready with previous event when the next arrives and something wonky happens. I've resulted in building an action queue, i.e. I process events and queue the actions  (checking if I have same kind of action already stacked up so I don't do same thing several times) and let that process a bit late.