Your timing is impeccable. We have managed to come up with a viable workaround for the PS Mac event issue. We literally have it ready as of today.
I have attached both an SWC that contains the workaround and a sample project to show you how to use it.
There are a couple of caveats -
- This workaround has minimally tested. Use at your own risk. We have not stress tested at all.
- Each time the workaround is invoked it requires roughly 0.02 seconds. While not significant by itself, they can add up, depending on how you use it.
The sample project should be enough to show you how to use it.
Feel free to post questions as they come up.
Thanks a lot for this workaround.
It seems to work, so thank you very much!
The only problem I've found so far - the second approach (with PsEventScrubber.getInstance().forceClean(...)) only works once.
If I try to handle the same event twice using forceClean, I get the same "General Photoshop error occurred. This functionality may not be available in this version of Photoshop." error as before.
To reproduce the problem, you can just invoke the timer in the secondDemo function twice:
public function secondDemo( evt: TimerEvent ): void
//instead of invoking the timer below just once, try to invoke it twice
var timer: Timer = new Timer( 1000, 2);
timer.addEventListener( TimerEvent.TIMER, secondHandler );
trace( "timer started for second demo" );
Do I need to call some cleanup code after I use forceClean?
However the first approach seems to work fine.
Also, will it be possible for you to briefly explain what PsEventScrubber library does?
Thank you once again,
Your post confused me as I was seeing nothing like that here. I had a "versioning problem". The code on my Mac (where I did most of the testing) had one more (very important) line of code. Sorry. The attached library should fix the problem you're having with forceClean.
As for what the workaround does:
Ps DOM calls worked just fine when called from the context of a UI event. The only issue was when the event was a system-type event. What we were looking for was a way to end the event chain of the system event and yet continue executing the handler.
Early on we found that you could execute a script using CSXSInterface.getInstance().evalScript - and that script could call PS DOM functions.
The happy thought was to call into evalScript, to a script that used a HostObject to call back to ActionScript.
PsMacDom.swc.zip 54.5 K
The second approach works now.
I'm just writing here to know if the PsMacDom project still open.....we have few problems with it....and i don't know where ask help....