<method>

Description

Used for the Spry framework. This tag replaces the menu tag for specifying methods for a code hints pop-up menu. When you type a method name in Code view, Dreamweaver opens a menu of method prototypes that provides a list of parameters for the method. It then tracks the sequence of parameters as they are being filled. For methods that don't have parameters, Dreamweaver closes the method call by adding the parentheses "()" characters.

The current argument is displayed in bold. Each time you type a comma, Dreamweaver updates the menu to display the next argument in bold. For object methods, when you type an object name, Dreamweaver opens a menu of the methods that are defined for that object.

Attributes

pattern, icon, object, source, constructor, static, retType

  • The pattern attribute specifies the name of the method and its argument list. It also describes the names of the object and the method, and the arguments of the method. The menu shows the list of arguments for the method. The code hints menu appears when the user types objectname. (including the period). This menu shows the methods that have been specified for the object. Then, the code hints menu opens a list of the arguments for the method, as it does for a function.

  • The icon attribute specifies which icon to use.

  • The object attribute refers to the type to which the command belongs. For example, Built-In Data Type: String or user-defined data type custom JavaScript file.

  • The source attribute refers to the location in which it is defined or originates from. For example, DOM/Javascript/custom file.js.

  • The constructor attribute is a Boolean value. constructor = true refers to the method which constructs the object instance and is marked separately compared to other object methods.

  • The static attribute is a Boolean value. static = true indicates that the method does not work on specific object instance, but works on object type itself. For example,
    Date.parse(dateString)
  • The retType attribute refers to the method return type which in turn can be an object type to support a cascade of code hints.

Contents

None.

Container

The menu tag.