Copy link to clipboard
Copied
From what I've read on a mac JSX should be executed syncrhonously. Meaning that each function should run and the next should wait for the first to finish before it runs.
I have the following methods:
placementClick = 0;
setIndividualTemplate(xi, placementClick, 2);
placementClick++;
setIndividualTemplate(xi, placementClick, 3);
setIndividualTemplate opens a file and then it places it into another document. It does a few things.
I need for the first setIndividualTemplate to complete and then for the next one to fire up after. However this does not seem to be the case.
To test this I put an alert in setIndividualTemplate
alert('which: ' + placementClick);
the alert fires up 'which 0'
then 'which 1'
then it actually executes the commands in each method. How can I make this wait for one to finish before the other one starts? From my understanding I can't use promises.
Copy link to clipboard
Copied
Hi,
Could you please share the code the function named
setIndividualTemplate
By seeing the code, it will be easy to figure it out which command is taking the time to execute.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes that's correct what you are saying. It should work syncrhonously, But getting a code will help to debug and help you out and also we can confirm whethere we are also running into same problem or not.
Copy link to clipboard
Copied
After digging into this some more. It appears as if it doesn't run synchronously like the alerts come up back to back before the file opens but I think it does run synchronously.