Hello,
I wanted to be able, from my indesign extension developped with CS Extension Builder in Actionscript/AIR, to catch the events defined in com.adobe.indesign.Event.* and handle them in this. same extension
How Am i supposed to do that ? I can't find a way.
And in the same idea, is it possible to catch an event of the type "when user double click on a frame in an opened indesin document" or anything like that ?
Here is what i tryed in my actionscript code for a simple AFTER_OPEN event i tried to catch :
-----------
this.app.eventListeners.add(com.adobe.indesign.Event.AFTER_OPEN, afterOpenHandler);
-----------
(where this.app = InDesign.app;)
and
-----------
private function afterOpenHandler(e:Event):void {
//handling event code here
}
-----------
But it was not a real surprise when it drops an error : the add() function doesnt take a simple function name as second parameters like you do in actionscript, but an "Object" or a "javascript function". How Im supposed to handle this event in my actionscript now ? is this only possible ?
Any thoughts ?
Thanks in advance for your time !
Lionel
PS: I also tried a dozen unsuccessful attempt like Casting my function as an Object Type in the eventListeners.add() arguments and so on....
Ok, Now i get it. I need to use the Host adapter "CSHA InDesign" to enable this kind of integration ! thanks to this link if anyone has the same questions:
http://blogs.adobe.com/cssdk/2010/08/makesideheads-a-complete-indesign -cs5-panel-2.html
Regards
North America
Europe, Middle East and Africa
Asia Pacific