AdobeBridgeCS5SDK

Class CustomInfosetExtensionHandler

Object
   |
   +--CustomInfosetExtensionHandler

class CustomInfosetExtensionHandler


Demonstrates a basic implementation of a node-handling extension with a custom Infoset.

Usage

  1. Make sure the icon files required by this sample are in the ./resources folder (BEHFileIconxx.png)
  2. Run the snippet in the ExtendScript Toolkit (see Readme.txt) with Bridge CS5 as the target; you can do this only once, then you must restart Bridge if you want to run this sample again
  3. Arrange the Inspector palettes so the Favorites, Content Pane and the newly added 'SDK: Custom Infoset Data' palette are visible.
  4. Inspect the Favorites panel and select the new 'CIRoot' icon.
  5. Navigate through the node hierarchy in the Content pane, and notice how the custom infoset data changes in 'SDK: Custom Infoset Data' palette.
  6. In the 'SDK: Custom Infoset Data' palette, enter some new data in the 'Custom String' field and press Enter.
  7. Click Yes at the prompt.
  8. In 'SDK: Custom Infoset Data' palette, use the drop-down list to change the Boolean value of the custom Infoset member 'Custom Boolean'
  9. Click Yes at the prompt.

Description

Shows how to implement an ExtensionHandler and ExtensionModel with a custom Infoset object, using two supporting classes, SDKSystem and SDKNode.

This sample creates the ExtensionHandler object, whose definition includes the 'makeModel()' method, which Adobe Bridge uses to create the ExtensionModel object at node-display time. The function registers the ExtensionHandler, associating it with the node-identifying prefix.

The sample creates a custom Infoset object and its members, which contain different data types. The new Infoset is registered with its associated handler. The data for each handled node is stored by this Infoset object.

The sample creates a TabbedPalette named 'SDK: Custom Infoset Data' in which to display the custom data when a handled node is selected. The palette allows you to modify the values in two of the member fields of the custom Infoset.

The main function creates several nodes of the new type, and one manager object that stores the node-identifying prefix and root node. See the Adobe Bridge CS5 JavaScript Guide for more details of custom Infosets.

See:

Defined in CustomInfosetExtensionHandler.jsx


Field Summary
 String buttonIcon
          The image for the button icon
 String requiredContext
          The context in which this sample can run.
 
Constructor Summary
CustomInfosetExtensionHandler()
           
 
Method Summary
 Boolean canRun()
           Determines whether sample can be run given current context.
 Object initModel(ciModel, sys)
           Initialize the model and define the methods that this model supports
 Boolean run()
           Functional part of this sample, creates the ExtensionHandler object, whose definition includes the 'makeModel()' method, which Bridge uses to create the ExtensionModel object at node-display time.

Field Detail

buttonIcon

String buttonIcon

requiredContext

String requiredContext

Constructor Detail

CustomInfosetExtensionHandler

CustomInfosetExtensionHandler()

Method Detail

canRun

Boolean canRun()

initModel

Object initModel(ciModel, sys)

run

Boolean run()

AdobeBridgeCS5SDK

http://www.adobe.com/devnet/bridge
Documentation generated by JSDoc on Tue Apr 27 10:21:34 2010