Specifications

Chapter 9104
4 After the reports are selected and their settings are set, the user clicks the Run button.
At this point, Dreamweaver clears all items from the Site Reports tab of the Results panel.
Dreamweaver calls the
beginReporting() function in each report before the reporting
process begins. If a report returns
false from this function, it is removed from the report run.
5 Each file is passed to each report that was selected in the Reports dialog box using the
processFile() function. If the report needs to include information about this file in the
results list, it should call the
dw.resultsPalette.siteReports.addResultItem() function.
This process continues until all files that pertain to the users selection are processed, or the
user clicks the Stop button in the bottom of the window. Dreamweaver displays the name of
each file being processed and the number of files that remain to be processed.
Dreamweaver calls the
endReporting() function in each report after all the files have been
processed and the reporting process completes.
How stand-alone reports work
1 The custom command opens a new results window by calling dw.createResultsWindow and
storing the returned results object in a window variable. The remaining functions in this
process should be called as methods of this object.
2 The custom command initializes the title and format of the Results window by calling
setTitle() and SetColumnWidths() as methods of the results window object.
3 The command can either start adding items to the Results window immediately by calling
addItem(), or it can begin iterating through a list of files by calling setFileList() and
startProcessing() as methods of the Results window object.
4 When the command calls resWin.startProcessing(), Dreamweaver calls the function
processFile() for each file URL in the list. Define the processFile() function in the
stand-alone command. It receives the file URL as its only argument. Use the
setCallbackCommands() function of the Results window object if you want Dreamweaver to
call
processFile() in some other command.
5 To cal l addItem(), the processFile() function needs to have access to the Results window
that was created by the stand-alone command. The
processFile() function can also call the
stopProcessing() function of the Results window object to stop processing the list of files.
The Reports API
The only required function for the Reports API is the processFile() function. All other
functions are optional.
processFile()
Description
Called when there is a file to process. The Report command should process the file without
modifying it and use the
dw.ResultsPalette.SiteReports() function, the addResultItem()
function, or the
resWin.addItem() function to return information about the file. Dreamweaver
automatically releases each files DOM when it is finished.
Arguments
strFilePath
strFilePath is the full path and filename of the file to process.