Adobe Extending Dreamweaver CS4 User Manual

Page 216

Advertising
background image

210

EXTENDING DREAMWEAVER CS4

Tag libraries and editors

<!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog">

<html>
<head>
<title>CFWEATHER</title>
<script src="../../Shared/Common/Scripts/dwscripts.js"></script>
<script src="../../Shared/Common/Scripts/ListControlClass.js"></script>
<script src="../../Shared/Common/Scripts/tagDialogsCmn.js"></script>
<script>

/************************* GLOBAL VARS **************************/
var TEMPATURESCALELIST; // tempaurelist control (initialized in initializeUI())
var theUIObjects; // array of UI objects used by common API functions
/****************************************************************/

// inspectTag() API function defined (required by all tag editors)
function inspectTag(tagNodeObj)
{

// call into a common library version of inspectTagCommon defined
// in tagDialogCmns.js (note that it's been included)
// For more information about this function, look at the comments
// for inspectTagCommon in tagDialogCmn.js
tagDialog.inspectTagCommon(tagNodeObj, theUIObjects);

}
function applyTag(tagNodeObj)
{

// call into a common library version of applyTagCommon defined
// in tagDialogCmns.js (note that it's been included)
// For more information about this function, look at the comments
// for applyTagCommon in tagDialogCmn.js
tagDialog.applyTagCommon(tagNodeObj, theUIObjects);

}
function initializeUI()
{

// define two arrays for the values and display captions for the list
control
var theTempatureScaleCap = new Array("celsius","fahrenheit");
var theTempatureScaleVal = new Array("celsius","fahrenheit");

// instantiate a new list control
TEMPATURESCALELIST = new ListControl("thetempaturescale");

// add the tempaturescalelist dropdown list control to the uiobjects
theUIObjects0= new Array(TEMPATURESCALELIST);

// call common populateDropDownList function defined in tagDialogCmn.js to
// populate the tempaturescale list control
tagDialog.populateDropDownList(TEMPATURESCALELIST, theTempatureScaleCap,
theTempatureScaleVal, 1);

}
</script>

</head>
<body onLoad="initializeUI()">
<div name="General">

Advertising
This manual is related to the following products: