Macromedia dreamweaver 8-extending dreamweaver 사용자 설명서

다운로드
페이지 504
Stand-alone reports
253
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.
How stand-alone reports work
1.
The custom command, which is the command you create to generate the report, opens a 
new results window by calling the 
dw.createResultsWindow()
 function 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 the 
setTitle() 
and
 SetColumnWidths()
 functions as methods of the Results window 
object.
3.
The command can either start adding items to the Results window immediately by calling 
the 
addItem()
 function, or it can begin iterating through a list of files by calling the 
setFileList()
 and 
startProcessing()
 functions as methods of the Results window 
object.
4.
When the command calls 
resWin.startProcessing()
, Dreamweaver calls the 
processFile()
 function 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 the 
processFile()
 function in some other command.
Path
File
Description
Configuration/Commands
commandname
.htm
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.
Configuration/Commands
commandname.
js
Generates a Results window and puts 
the report in it.