In a Timer callback in my AS3 code, I try to get the current active PSD document :
var myDocument:com.adobe.photoshop.Document = app.activeDocument;
The document is open, in fact it is the only open document, yet activeDocument comes out null when read from the Timer callback.
I have a button in my extension panel, which when clicked also tries to read the active document property. That works. Suggesting some issue with async callbacks ?
So why should it matter if an asynchronous callback is requesting the activeDocument. Same issues occurs from inside an HttpService
callback (on request completion).
Exact same code work in InDesign.
Is this a bug in PS CS-SDK ? Any recipie to deal with the activeDocument issue ? I can't change the code to become synchronous, have
to rely on timer/Http service callbacks to pull the activeDocument property.
Thanks Bob, just sepnt 4 hours debugging this, thinking must be my bug!
macSafeAddEventListener right away.
It worked on Mac for me , thanks Bob