Adobe Extending Dreamweaver CS4 Uživatelský manuál Strana 365

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 387
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 364
359
EXTENDING DREAMWEAVER CS4
C-level extensibility
Note: Most JavaScript extensions need not be changed to write to the user Configuration folder. Only C shared libraries
that write to the Configuration folder must be updated to use the file access and multiuser configuration API functions.
When you delete a file from the Dreamweaver Configuration folder, Dreamweaver adds an entry to a mask file. This
entry is added to indicate which files in the Configuration folder must not appear in the user interface. A masked file
or folder does not appear to exist to Dreamweaver although it possibly exists in the folder.
For example, if you use the Trash Can icon in the Snippets panel to delete a Snippets folder called javascript and a file
called onepixelborder.csn, Dreamweaver writes a file in the user Configuration folder called mm_deleted_files.xml. It
looks like the following example:
<?xml version = "1.0" encoding="utf-8" ?>
<deleteditems>
<item name="snippets/javascript/" />
<item name="snippets/html/onepixelborder.csn" />
</deleteditems>
As Dreamweaver populates the Snippets panel, it reads all the files in the user Configuration/Snippets folder. It also
reads all the files in the Dreamweaver Configuration/Snippets folder, except the Configuration/Snippets/javascript
folder and the Configuration/Snippets/html/onepixelborder.csn file. It adds the resulting list of files to the Snippets
panel list.
If a C-level extension calls the MM_ConfigFileExists() function for the file:///c|Program Files/Adobe
/Adobe Dreamweaver CS4/Configuration/Snippets/javascript/onepixelborder.csn URL, it returns a value
of
false. Likewise, if a JavaScript extension tries to call dw.getDocumentDom(file:///c|Program
Files/Adobe/Adobe Dreamweaver CS4/Configuration/Snippets/javascript/onepixelborder.csn), it
returns a
null value.
Edit the mm_deleted_files.xml file to prevent Dreamweaver from showing files in the user interface, such as objects,
canned content in the new dialog box, and so on. You can call the
MM_DeleteConfigfile() function to add file paths
to the mm_deleted_files.xml file.
JS_Object MM_GetConfigFolderList()
Availability
Dreamweaver MX.
Description
This function gets a list of files, folders, or both for the specified folder. If you specify a configuration folder, the
function gets a list of the folders that exists in both the user Configuration folder and the Dreamweaver Configuration
folder, subject to filtering by the mm_deleted_files.xml file.
Arguments
char *fileURL, char *constraints
The char *fileUrl argument is a pointer to a string that names the folder for which you want a list of the contents.
The string must have the format of a file:// URL. The function accepts valid wildcard characters of asterisks (*) and
question marks (?) in the file:// URL string. Use asterisks (*) to represent one or more unspecified characters, and
question marks (?) to represent a single unspecified character.
The char *contstraints argument can be files or directories or a null value. If you specify null, the
MM_GetConfigFolderList() function returns files and folders.
Zobrazit stránku 364
1 2 ... 360 361 362 363 364 365 366 367 368 369 370 ... 386 387

Komentáře k této Příručce

Žádné komentáře