Displayhelp(), Editdynamicsource() – Adobe Extending Dreamweaver CS4 User Manual
Page 305
299
EXTENDING DREAMWEAVER CS4
Data sources
For example, in Dreamweaver, if the selection is a recordset or command, the
deleteDynamicSource()
function calls
the
dw.serverBehaviorInspector.deleteServerBehavior()
function. If the selection is a request, session, or
application variable, the function remembers that the variable was deleted and does not continue to display it. After
the
deleteDynamicSource()
function returns, Dreamweaver erases the contents of the data source tree and calls the
findDynamicSources()
and
generateDynamicSourceBindings()
functions to get a new list of all the data sources
for the user’s document.
Arguments
sourceName, bindingName
•
The sourceName argument is the name of the top-level node to which the child node is associated.
•
The bindingName argument is the name of the child node.
Returns
Dreamweaver expects nothing.
displayHelp()
Description
If this function is defined, a Help button appears below the OK and Cancel buttons in the dialog box. This function is
called when the user clicks the Help button.
Arguments
None.
Returns
Dreamweaver expects nothing.
Example
// The following instance of displayHelp() opens
// a file (in a browser) that explains how to use
// the extension.
function displayHelp(){
var myHelpFile = dw.getConfigurationPath() +
'/ExtensionsHelp/superDuperHelp.htm';
dw.browseDocument(myHelpFile);
}
editDynamicSource()
Availability
Dreamweaver MX.
Description
This function is called when the user double-clicks a data source name in the Bindings panel to edit the data source.
You can implement this function to handle user edits in the tree. Otherwise, the server behavior that matches the data
source is automatically invoked. The extension developer can use this function to override the default implementation
of server behaviors and provide a custom handler.