Stand-Alone Reports - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

reportItem(REP_ITEM_CUSTOM, fileURL, imgfilename,
curDOM.nodeToSourceViewOffsets(tagList[i])); }
}
}
2
Save the file as List Images.js in the Configuration/Reports/HTML Reports folder.

Stand-alone reports

You can use the results window API to create a stand-alone report. Stand-alone reports are regular commands that
directly use the results window API rather than the reports API. You can access a stand-alone report the same way
you access any other command, through the menus or through another command.
Stand-alone reports reside in the Dreamweaver Configuration/Commands folder. A custom command for a stand-
alone report appears on the Commands menu.
Dreamweaver creates a new Results window each time the user runs a new stand-alone report.
Path
Configuration/Commands
Configuration/Commands
How stand-alone reports work
The custom command, which is the command you create to generate the report, opens a new results window by
1
calling the
dw.createResultsWindow()
remaining functions in this process should be called as methods of this object.
The custom command initializes the title and format of the Results window by calling the
2
functions as methods of the Results window object.
SetColumnWidths()
3
The command can either start adding items to the Results window immediately by calling the
function, or it can begin iterating through a list of files by calling the
functions as methods of the Results window object.
When the command calls
4
each file URL in the list. Define the
as its only argument. Use the
weaver to call the
processFile()
To call the
function, the
5
addItem()
was created by the stand-alone command. The
function of the Results window object to stop processing the list of files.
A simple stand-alone report example
The simple stand-alone report extension lists all the images referenced in a particular file and displays the report in
the Results window.
File
commandname.htm
commandname.js
function and storing the returned results object in a window variable. The
resWin.startProcessing()
function in the stand-alone command. It receives the file URL
processFile()
setCallbackCommands()
function in some other command.
processFile()
processFile()
Description
Defines the UI for the dialog box that appears
when the user selects the command and
contains the JavaScript code or a reference to
the JavaScript file that performs the actions
needed to generate the report.
Generates a Results window and puts the
report in it.
setFileList()
, Dreamweaver calls the
function of the Results window object if you want Dream-
function needs to have access to the Results window that
function can also call the
DREAMWEAVER CS3
Extending Dreamweaver
and
setTitle()
addItem()
and
startProcessing()
function for
processFile()
stopProcessing()
191

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents