beautypg.com

Chapter 4: the design notes api, How design notes work, The design notes javascript api – Adobe Dreamweaver API Reference CS5 User Manual

Page 26: Mmnotes.close()

background image

21

Last updated 8/27/2013

Chapter 4: The Design Notes API

Adobe® Dreamweaver®, Adobe® Fireworks®, and Adobe® Flash® give web designers and developers a way to store and
retrieve extra information about documents. The information is stored in files that are called Design Notes. It gives
extra information about documents like review comments, change notes, or the source file for a GIF or JPEG.

For more information about using the Design Notes feature from within Dreamweaver, see Using Dreamweaver.

How Design Notes work

Each Design Notes file stores information for a single document. If one or more documents in a folder has an
associated Design Notes file, Dreamweaver creates a _notes subfolder where Design Notes files can be stored. The
_notes folder and the Design Notes files that it contains are not visible in the Site panel, but they appear in the Finder
(Macintosh) orWindows Explorer. A Design Notes filename comprises the main filename plus the .mno extension.
For example, the Design Notes file that is associated with avocado8.gif is avocado8.gif.mno.

Design Notes files are XML files that store information in a series of key/value pairs. The key describes the type of
information that is being stored, and the value represents the information. Keys are limited to 64 characters.

The following example shows the Design Notes file for foghorn.gif.mno:

foghorn.png" />


The Design Notes JavaScript API

All functions in the Design Notes JavaScript API are methods of the MMNotes object. MMNotes is a C shared library
that lets extensions authors read and write Design Notes files. As with the DWfile shared library, MMNotes has a
JavaScript API that lets you call the functions. The functions are called from objects, commands, behaviors, floating
panels, Property inspectors, and data translators in the library. The MMNotes shared library can be used
independently, even if Dreamweaver is not installed.

MMNotes.close()

Description
This function closes the specified Design Notes file and saves any changes. If all the key/value pairs are removed,
Dreamweaver deletes the Design Notes file. If it is the last Design Notes file in the _notes folder, Dreamweaver deletes
the folder also.

Note: Always call the

MMNotes.close()

function when you finish with Design Notes so Dreamweaver writes to the file.