beautypg.com

Crosstag attributes code hinting – Adobe Extending Dreamweaver CS4 User Manual

Page 39

background image

33

EXTENDING DREAMWEAVER CS4

Customizing Code view


...
...



allowwhitespaceprefix="true">

icon="shared/mm/images/hintMisc.gif" datatype="string"/>

value="sortOrderOnLoad:" icon="shared/mm/images/hintMisc.gif"
type="enumerated" datatype="string">

icon="shared/mm/images/hintMisc.gif"/>

icon="shared/mm/images/hintMisc.gif"/>

Declaring classes
The following format declares a class by associating a variable to the class:

<variablename>[space][= operator][new keyword][space]<classname>

For example:

var dsFoo = new Spry.Data.XMLDataSet("products.xml", "products/product");
var fooAccordion = new Spry.Widget.Accordion("accordionDivId");

In the case of the

Spry.XML.DataSet

class name, you must redeclare it in the ColorCoding.xml file so that the coloring

state engine recognizes that it is an instance of a class and takes the variable name defined on the left side of the
declaration and stores it in the list of variables with their corresponding class types for that page (such as the variable

fooAccordion

and the class type

Spry.Widget.Accordion

from the previous example).

The syntax for redeclaring the class name in CodeColoring.xml:

Spry.Data.XMLDataSet
Spry.Widget.Accordion

Where:

classlibrary

is a new tag to group the classes into the color id

"CodeColor_JavascriptSpry"

class

is used to list each individual class available in the class library. The list of classes can grow to include other

spry classes from different spry packages (such as: Debug, Data, Utils, Widgets, and Effects), or other
Asynchronous JavaScript and XML (Ajax) toolkits or JavaScript libraries.

Crosstag attributes code hinting

Dreamweaver provides code hinting for the Spry attribute names and values. Since these attributes are common across
tags, instead of opening each tag.vtm file and adding the Spry attribute list, Dreamweaver has a new XML format for
attribute groups (for example: spry:region, spry:repeat) and tag groups which can be applied in a single VTM file
named Spry.vtm in the Configuration/TagLibraries directory.

This manual is related to the following products: