recent projects, developing Adobe Illustrator's plugins under the C + + platform, and designing the UI for the Adobe application Extension created by Flash Builder Projects under the Adobe Illustrator platform in Project. This article describes how to interact with C + + engineering for messaging. first, according to my previous article, I introduced a new UI project and switched to the design interface. Drag the control into the panel as shown in. After you drag the button in, add a click event. If you drag into the text input box, give an ID number
Switch to source code mode, according to the Tutorialui Engineering sample code provided by Adobe Illustrator Development. In the initialization method, add:
CSInterface.instance.addEventListener (Get_params_req, respondtoparams); Dispatch Ready Event var event:csxsevent = new Csxsevent (Dialog_ready, csxseventscope.application); CSInterface.instance.dispatchEvent (event);
the first line represents the incoming listener for the C + + project, and the latter two lines indicate that the dialog box initiates a message event that is distributed to C + +. Among them,
Events we dispatch private static const Dialog_ready:string = "Com.lm.shpToAI.shpToAIDialogReady"; Events We listen out for private static const Get_params_req:string = "Com.lm.shpToAI.shpToAIGetParamsReq";
The Respondtoparams method implements the subsequent processing of C + + incoming messages.
For button distribution events, implement the following code, write the outgoing data to a payload XML object, and then take advantage of the CSInterface.instance.dispatch event.
var payload:xml = <payload> <cancelled>{cancelled}</cancelled> <edittext>{ edittext.text}</edittext> <nextText>{nextText.text}</nextText> </payload>; var event:csxsevent = new Csxsevent (GET_PARAMS_RESP, csxseventscope.application, payload); CSInterface.instance.dispatchEvent (event);
Engineering--Properties--Run Configuration (Debug configuration)
Run to show your extended UI in the AI interface.
I was only contacted, may have a lot of expression problems, hope understanding.
Adobe Illustrator Engineering and C + + engineering message Delivery