![MACROMEDIA DREAMWEAVER MX 2004-DREAMWEAVER API Reference Download Page 275](http://html1.mh-extra.com/html/macromedia/dreamweaver-mx-2004-dreamweaver-api/dreamweaver-mx-2004-dreamweaver-api_reference_3336554275.webp)
Global document functions
275
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);
dreamweaver.setPreferenceInt()
Availability
Dreamweaver MX.
Description
Lets you set an integer preference setting for an extension. This setting is stored with
Dreamweaver preferences when Dreamweaver is not running.
Arguments
section
,
key
,
new_value
•
The
section
argument is a string that specifies the preferences category in which the option is
set. If the category does not exist, Dreamweaver creates it.
•
The
key
argument is a string that specifies the category option that the function sets. If the
option does not exist, Dreamweaver creates it.
•
The
new_value
argument is an integer that specifies the value of the category option.
Returns
A
true
value if successful;
false
otherwise.
Example
The following example sets the Snap Distance entry to the value of the variable
snapDist
in the
My Extension category of Preferences:
var snapDist = getSnapDistance();
if(snapDist > 0)
{
dreamweaver.setPreferenceInt("My Extension", "Snap Distance", snapDist);
}
000_DW_API_Print.book Page 275 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...