MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Dokumentacja Strona 109

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 504
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 108
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.
Przeglądanie stron 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 503 504

Komentarze do niniejszej Instrukcji

Brak uwag