Adobe 38040334 - Dreamweaver CS3 User Manual page 256

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Arguments
section, key, default_value
• The
argument is a string that specifies the preferences section that contains the entry.
section
• The
argument is a string that specifies the entry of the value to retrieve.
key
• The
argument is the default value that Dreamweaver returns if it cannot find the entry. This value
default_value
must be an unsigned integer in the range 0 through 65,535 or a signed integer in the range -32,768 through 32,767.
Returns
Integer value of the specified entry in the specified section or the default value if the function does not find the entry.
Returns 0 if the value of the specified entry is not an integer.
Example
The following example returns the integer value of the Snap Distance setting in the My Extension section of Prefer-
ences. If there is no MyExtension section or no Snap Distance entry, the function returns the specified default value
of 0.
var snapDist; //default value if entry not found
snapDist = dreamweaver.getPreferenceInt("My Extension", "Snap Distance", 0);
dreamweaver.getPreferenceString()
Availability
Dreamweaver MX.
Note: To access the preferences for sites, you must have version 7.0.1. Check
before accessing site information.
Description
Lets you retrieve a string preference setting that you stored for an extension.
Arguments
section, key, default_value
• The
argument is a string that specifies the preferences section that contains the entry.
section
• The
argument is a string that specifies the value to retrieve.
key
• The
argument is the default string value that Dreamweaver returns if it cannot find the entry.
default_value
Returns
The requested preference string, or if the string cannot be found, the default value.
Example
The following example returns the String value of the Text Editor setting in the My Extension section of Preferences.
If there is no MyExtension section or no Text Editor entry, the function returns the default value specified by the
variable
.
txtEditor
var txtEditor = getExternalTextEditor(); //set default text Editor value
txtEditor = dreamweaver.getPreferenceString("My Extension", "Text Editor", txtEditor);
for the correct version
dw.appVersion
DREAMWEAVER CS3
251
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents