
Working with the Extension Manager
109
Localizable Strings with Embedded Values
Some display strings have values embedded in them. You can use the
errMsg()
function to
display these strings. You can find the
errMsg()
function, which is similar to the
printf()
function in C, in the string.js file in the Configuration/Shared/MM/Scripts/CMN
folder. Use
the placeholder characters percent sign (
%)
and
s
to indicate where values should appear in
the string and then pass the string and variable names as arguments to
errMsg()
. For
example:
<string id="featureX/fileNotFoundInFolder" value="File %s could not be
found in folder %s."/>
The following example shows how the string, along with any variables to embed, is passed to
the
alert()
function.
if (fileMissing)
{
alert( errMsg(dw.loadString("featureX/fileNotFoundInFolder"),fileName,
folderName) );
}
Working with the Extension Manager
If you create extensions for others users, you must package them according to the guidelines
on the Macromedia Exchange website (
www.macromedia.com/exchange
) under the Help >
How to Create an Extension category. After you have written and tested an extension in the
Extension Manager, select File > Package Extension. After the extension is packaged, you can
submit it to the Exchange from the Extension Manager by selecting File > Submit Extension.
The Extension Manager comes with Dreamweaver. Details about its use are available in its
Help files and on the Macromedia Exchange website.
Summary of Contents for DREAMWEAVER 8-EXTENDING DREAMWEAVER
Page 1: ...Extending Dreamweaver...
Page 8: ...8 Contents...
Page 14: ...14 Introduction...
Page 16: ......
Page 54: ...54 Customizing Dreamweaver...
Page 96: ...96 Customizing Code View...
Page 98: ......
Page 110: ...110 Extending Dreamweaver...
Page 138: ......
Page 166: ...166 Insert Bar Objects...
Page 180: ...180 Commands...
Page 248: ...248 Toolbars...
Page 260: ...260 Reports...
Page 278: ...278 Tag Libraries and Editors...
Page 288: ...288 Property Inspectors...
Page 378: ...378 Server Behaviors...
Page 398: ...398 Data Sources...
Page 432: ...432 Server Models...
Page 456: ...456 Data Translators...
Page 482: ......
Page 492: ...492 The Shared Folder...