Using The Shared Folder - Adobe 38040334 - Dreamweaver CS3 User Manual

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

Advertisement

File
string.js
TemplateUtils.js
UI.js
Other folders
The following list describes other folders of interest in the Shared folder:
• Controls
The Controls folder contains the elements used to build a server behavior. These controls include interfaces for text
and recordset menus.
Note: These controls are used by the Dreamweaver Server Behavior Builder and by many of the Dreamweaver server
behaviors but some are useful for managing a control in your extension.
• Fireworks
The Fireworks folder has the supporting files for Fireworks integration.
• UltraDev
Dreamweaver maintains this folder primarily for backward compatibility, and it should not be used for new exten-
sions. Use the Dreamweaver Configuration/Shared/Common folder, where most of this functionality also exists. See
"The Common folder" on page 365.

Using the Shared folder

Look first in the Dreamweaver Configuration/Shared/Common folder for useful extension code because this folder
contains the most current and commonly used functionality.
Extensions can leverage the resources in the Shared folder for their own functionality. An object, command, or other
extension can specify one of the JavaScript files in the Shared folder as a source file in a
function in the body of the file or in another included JavaScript file. Objects and commands can even link several
JavaScript files together, and those JavaScript files can leverage Shared folder resources.
For example, open the Hypertext object file (Hyperlink.htm) in the application folder
Configuration/Objects/Common. Notice that the
<script language="javascript"
src="../../Shared/Common/Scripts/ListControlClass.js"></script>
<script language="javascript" src="Hyperlink.js"></script>
And, if you open the related Hyperlink.js file, you can see the following lines:
Description
Contains a generic set of functions for manipulating and parsing text strings. Functions include:
,
extractArgs()
escQuotes()
,
,
badChars()
getParam()
,
AllInRange()
reformat()
code()
,
entityNameDecode()
Contains utility functions for Dreamweaver templates. Functions insert an editable region into a docu-
ment, insert a repeating region into a document, scan a document for a specified editable region, and
so on.
Contains generic functions that control the UI. These functions find a designated object in the current
document, load select list options with localized strings, return the attribute value for a selected
option, and word-wrap the text message for an alert.
tag of the file contains the following lines:
head
,
,
unescQuotes()
quoteMeta()
,
,
quote()
stripSpaces()
,
,
trim()
createDisplayString()
,
stripAccelerator()
DREAMWEAVER CS3
Extending Dreamweaver
,
,
errMsg()
,
StripChars()
,
entityNameEn-
, and
SprintF()
.
tag, and then use the
script
369

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents