Skip navigation
iware
Currently Being Moderated

Indesign Events handling in my AIR CS Extension for Indesign

Apr 25, 2012 6:03 AM

Tags: #cs #indesign #creative #suite #event #sdk #eventlistener #eventlistener.add #after_open #after_close

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....

 


 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points