You’ve just created the coolest extension you’ve ever seen, almost. It really needs to support drag and drop; but, that seems like so much work; and, there are no decent, real world examples of how to do it.
How about we fix that. Here’s a decent example of how to do drag and drop between CS extensions and their CS host applications (both ways, even!).
You need to add C/C++ functionality to one of the Creative Suite applications and you need your custom code to work together with an Actionscript-based CS Extension. Where do you start?
You will need to create two separate projects: 1) You will need to create a native plugin using Visual Studio and/or XCode using the SDK provided for the point product you are developing for. 2) You will need to create a CS Extension using the CS SDK / Extension Builder. These two entities can then work together as described below.
Creating menus which extend beyond panel bounds in CS Extensions very often requires the use of a "NativeComboBox". NativeComboBox uses NativeMenu. When clicking on a NativeMenu, a button below the menu can have its state change incorrectly to the down state.
Subclass Button to fix the state.
So you've made this really cool extension that runs under more than one CS product. That being the case, it's quite possible your user will have the extension open in more than one CS app at a time. If that should happen, it might (depending on what your extension does) be nice to have the extensions show the same data all the time across all instances of the extension.
This recipe will demonstrate one way to use CSXS Events to synchronize data models between two instances of the same extension running under different CS products.
UndoModes in InDesign (CS4 and later) allow for multiple steps in a script to be saved as a single step in the undo stack. Using this capability in a CS SDK extension is not very straight-forward because you can't pass in ActionScript code to a doScript. doScript() accepts one of the three scripting languages which ActionScript is not one.
Use one of the native scripting languages as the argument of the doScript(). There are many ways of approaching this as described below.
This site is produced in partnership with O'Reilly.