Adobe 38040334 - Dreamweaver CS3 User Manual page 318

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Description
This function gets the code that is dragged and dropped in Code view from the Components panel or the code that
is cut, copied, or pasted from the Components panel.
Arguments
componentRec
• The
argument is an object.
componentRec
Returns
The string that contains the code for the component.
Example
The following example identifies the code for a common web service:
function getCodeViewDropCode(componentRec)
{
var codeToDrop="";
if (componentRec)
{
if (componentRec.objectType=="Class")
{
codeToDrop = dw.getExtDataValue("webservices_constructor","insertText");
codeToDrop = codeToDrop.replace(RegExp("@@Id@@","g"),componentRec.name);
codeToDrop = codeToDrop.replace(RegExp("@@Class@@","g"),componentRec.name);
}
else if (componentRec.objectType=="Method")
{
codeToDrop = componentRec.dropCode;
}
if(componentRec.dropCode)
{
codeToDrop = componentRec.dropCode;
}
else
{
codeToDrop = componentRec.name;
}
}
return codeToDrop;
}
getSetupSteps()
Availability
Dreamweaver MX.
Description
Dreamweaver calls this function if the
function controls the server-side setup instructions, which can be implemented using extensions that use a modal
dialog box and extensions that use server components.
setupStepsCompleted()
function returns zero or a positive integer. This
DREAMWEAVER CS3
312
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents