< Day Day Up > |
The only required function for the Reports API is the processFile() function. All other functions are optional. processFile()Availability Dreamweaver 4. Description This function is 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 file's DOM when it finishes. Arguments strFilePath
Returns Dreamweaver expects nothing. beginReporting()Availability Dreamweaver 4. Description This function is called at the start of the reporting process, before any reports are run. If the Report command returns a false value from this function, the Report command is excluded from the report run. Arguments target
Returns Dreamweaver expects a Boolean value: TRue if the report runs successfully; false if target is excluded from the report run. endReporting()Availability Dreamweaver 4. Description This function is called at the end of the Report process. Arguments None. Returns Dreamweaver expects nothing. commandButtons()Availability Dreamweaver 4. Description Defines the buttons that should appear on the right side of the Options dialog box and their behavior when they are clicked. If this function is not defined, no buttons appear, and the BODY section of the report file expands to fill the entire dialog box. Arguments None. Returns Dreamweaver expects an array that contains an even number of elements. The first element is a string that contains the label for the topmost button. The second element is a string of JavaScript code that defines the behavior of the topmost button when it is clicked. The remaining elements define additional buttons in the same manner. Example The following instance of the commandButtons() function defines the OK, Cancel, and Help buttons. function commandButtons(){ return new Array("OK" , "doCommand()" , "Cancel" , "window.close()" , "Help" , "showHelp ()"); } configureSettings()Availability Dreamweaver 4. Description Determines whether the Report Settings button should be enabled in the Reports dialog box when this report is selected. Arguments None. Returns Dreamweaver expects a Boolean value: TRue if the Report Settings button should be enabled; false otherwise. windowDimensions()Availability Dreamweaver 4. Description Sets specific dimensions for the Parameters dialog box. If this function is not defined, the window dimensions are computed automatically. NOTE Do not define this function unless you want an Options dialog box that is larger than 640 x 480 pixels. Arguments platform
Returns Dreamweaver expects a string of the form "widthInPixels,heightInPixels". The returned dimensions are smaller than the size of the entire dialog box because they do not include the area for the OK and Cancel buttons. If the returned dimensions do not accommodate all options, scroll bars appear. Example The following instance of the windowDimensions() function sets the dimensions of the Parameters dialog box to 648 x 520 pixels: function windowDimensions(){ return "648,520"; } |
< Day Day Up > |