Global application functions

 < Day Day Up > 

Global application functions act on the entire application. They handle tasks such as quitting and accessing Preferences.

dreamweaver.beep()

Availability

Dreamweaver MX.

Description

Creates a system beep.

Arguments

None.

Returns

Nothing.

Example

The following example calls dw.beep() to call the user's attention to a message that the alert() function displays:

 beep(){   if(confirm("Is your order complete?")   {     dreamweaver.beep();     alert("Click OK to submit your order");   } } 

dreamweaver.getShowDialogsOnInsert()

Availability

Dreamweaver 3.

Description

Checks whether the Show Dialog When Inserting Objects option is turned on in the General category of Preferences.

Arguments

None.

Returns

A Boolean value that indicates whether the option is on.

dreamweaver.quitApplication()

Availability

Dreamweaver 3.

Description

Quits Dreamweaver after the script that calls this function finishes executing.

Arguments

None.

Returns

Nothing.

dreamweaver.showAboutBox()

Availability

Dreamweaver 3.

Description

Opens the About dialog box.

Arguments

None.

Returns

Nothing.

dreamweaver.showDynamicDataDialog()

Availability

Dreamweaver UltraDev 1.

Description

Displays the Dynamic Data or the Dynamic Text dialog box, and waits for the user to dismiss the dialog box. If the user clicks OK, the showDynamicDataDialog() function returns a string to insert into the user's document. (This string returns from the Data Sources API function, generateDynamicDataRef(), and passes to the Data Format API function, formatDynamicDataRef(); the return value from formatDynamicDataRef() is the one that the showDynamicDataDialog() function returns.)

Arguments

 source, {title} 

  • The source argument is a string that contains source code, which represents the dynamic data object. It is the same string that a previous call to this function returned. The function uses the contents of the source argument to initialize all the dialog box controls, so they appear exactly as when the user clicked OK to create this string.

    Dreamweaver passes this string to the inspectDynamicDataRef() function to determine if the string matches any of the nodes in the tree. If the string matches a node, that node is selected when the dialog box appears. You can also pass an empty string, which does not initialize the dialog box. For example, a dialog box is not initialized when used to create a new item.

  • The title argument, which is optional, is a string that contains the text to display in the title bar of the dialog box. If this argument is not supplied, Dreamweaver displays Dynamic Data in the title bar.

Returns

A string that represents the dynamic data object, if the user clicks OK.

dreamweaver.showPasteSpecialDialog()

Availability

Dreamweaver 8

Description

This function displays the Paste Special dialog box. If the user clicks OK, the showPasteSpecialDialog() function performs the paste.

Arguments

None.

Returns

Nothing.

Example

 dw.showPasteSpecialDialog(); 

dreamweaver.showPreferencesDialog()

Availability

Dreamweaver 3. Added the strCategory argument in Dreamweaver 8.

Description

This function opens the Preferences dialog box.

Arguments

 {strCategory} 

  • The strCategory argument, which is optional, must be one of the following strings to open the correlating category of the Preferences dialog box: "general", "accessibility", "html colors" (for the Code Coloring category), "html format" (for the Code Format category), "code hints", "html rewriting" (for the Code Rewriting category), "copyPaste", "css styles", "file compare", "external editors" (for the File Types/Editors category), "fonts", "highlighting", "invisible elements", "layers", "layout mode", "new document", "floaters" (for the Panels category), "browsers" (for the Preview in Browser category), "site ftp" (for the Site category), "status bar", and "validator". If Dreamweaver does not recognize the argument as a valid pane name, or if the argument is omitted, the dialog box opens to the last active pane.

Returns

Nothing.

Example

The following example opens the Preferences dialog box and selects the Code Coloring category:

 dw.showPreferencesDialog("html colors"); 

dreamweaver.showTagChooser()

Availability

Dreamweaver MX.

Description

Toggles the visibility of the Tag Chooser dialog box for users to insert tags into the Code view. The function shows the Tag Chooser dialog box on top of all other Dreamweaver windows. If the dialog box is not visible, the function opens it, brings it to the front, and sets focus to it. If the Tag Chooser is visible, the function hides the dialog box.

Arguments

None.

Returns

Nothing.

     < Day Day Up > 


    Developing Extensions for Macromedia Dreamweaver 8
    Developing Extensions for Macromedia Dreamweaver 8
    ISBN: 0321395409
    EAN: 2147483647
    Year: 2005
    Pages: 282

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net