beautypg.com

The cmn folder – Adobe Extending Dreamweaver CS4 User Manual

Page 376

background image

370

EXTENDING DREAMWEAVER CS4

The Shared folder

The CMN folder

The CMN folder contains the following utility functions:

File

Description

classCheckbox.js

Helps manipulate a check box control in your HTML extension.

FileClass.js

Contains a class that represents a file in the file system. The paths are represented by URLs for cross-
platform compatibility. Methods include

toString()

,

getName()

,

getSimpleName()

,

getExtension()

,

getPath()

,

setPath()

,

isAbsolute()

,

getAbsolutePath()

,

getParent()

,

getAbsoluteParent()

,

exists()

,

getAttributes()

,

canRead()

,

canWrite()

,

isFile()

,

isFolder()

,

listFolder()

,

createFolder()

,

getContents()

,

setContents()

,

copyTo()

, and

remove()

.

GridClass.js

Contains a class that manages

MM:TREECONTROL

.

GridControlClass.js

Older version of the

GridControlClass

in the Common folder. See the GridControlClass.js file in the

Shared/Common/Scripts folder.

ImageButtonClass.js

Older version of the

ImageButtonClass

in the Common folder. See the ImageButtonClass.js file in

the Shared/Common/Scripts folder.

ListControlClass.js

Older version of the

ListControlClass

in the Common folder. See the

Shared/Common/Scripts/ListControlClass.js file.

NameValuePairClass.js

Creates and manages a list of name/value pairs. Names can contain any character. Values can be blank,
but cannot be set to

null

, which is the same as deleting them.

PageControlClass.js

Example of a page class to be used with the

TabControl

class. See TabControlClass.js description.

PreferencesClass.js

Contains an object and methods that contain all the preference information for a command.

RadioGroupClass.js

Older version of the

RadioGroupClass

in the Common folder. See the RadioGroupClass.js file in the

Shared/Common/Scripts folder.

TabControlClass.js

Helps build an extension that has multiple tab views,

page.lastUnload().

File

Description

dateID.js

Contains two functions,

createDateID()

and

decipherDateID()

. Given three strings,

"

dayFormat"

, "

dateFormat"

, and "

timeFormat"

,

createDateID()

creates an ID for them. Given

a date array,

decipherDateID()

returns an array with three items: the

dayFormat

, the

dateFormat

, and the

timeFormat

.

displayHelp.js

Contains one function that displays the specified Help document.

docInfo.js

Contains functions that provide information about the user’s document. Operations performed by
functions include returning an array of object references for a specified browser type and tag,
returning all instances of a specified tag name, searching for a tag that wraps the current selection,
and so on.

DOM.js

Contains general helper functions for working with the Dreamweaver DOM. Includes functions that
get the root node of the active document, find a tag of a given name, create a list of nodes from the
specified starting node, check whether a given tag is contained inside another tag, perform various
operations on behavior functions, and more.

enableControl.js

Contains one function,

SetEnabled()

, which enables or disables a control based on the arguments

it receives. It is OK to enable a control that is already enabled or disable a control that is already
disabled.

errmsg.js

Contains logging functions for accumulating tracing output into an array of log pages that appear in
a dialog box.

This manual is related to the following products: