< Day Day Up > |
Results window functions let you create a stand-alone window that displays columns of formatted data, or you can interact with the built-in windows of the Results panel group. Creating a Stand-alone Results windowThese functions create custom windows that are similar to the output from the JavaScript Debugger window. dreamweaver.createResultsWindow()Availability Dreamweaver 4. Description Creates a new Results window and returns a JavaScript object reference to the window. Arguments strName, arrColumns
Returns An object reference to the created window. dreamweaver.showResults()Availability Dreamweaver MX 2004. Description Opens the specified results floating panel and selects the item. NOTE This function is supported only in the Validation, Target Browser Check, and Site Reports windows of the Results floating panel. Arguments floaterName, floaterIndex
Returns Nothing. Example The following example checks for errors at the offset of the current selection in the document and, if there are errors, displays them in the specified window (floaterName) of the Results panel. Otherwise, it opens the Target Browser Check window of the Results panel and displays the first visible item for the document. var offset = dw.getDocumentDOM().source.getSelection()[0]; var errors = dw.getDocumentDOM().source.getValidationErrorsForOffset(offset); if ( errors && errors.length > 0 ) dw.showResults( errors[0].floaterName, errors[0].floaterIndex ); else dw.showResults('btc', dw.getDocumentDOM().URL); resWin.addItem()Availability Dreamweaver 4. Description Adds a new item to the Results window. NOTE Use only on stand-alone results windows created with dreamweaver.createResultsWindow(). resWin.addItem() cannot be used with the built-in results windows, including Validation, Browser Target Check, or Site Reports. Arguments resultWindowObj, strIcon, strDesc, itemData, iStartSel, iEndSel, colNdata
Returns A Boolean value: true if the item was added successfully; false otherwise. Example The following example creates a Results window called resWin that has the column headings: Frodo, Sam, and Gollum. The call to the resWin.addItem() function adds a folder icon and then the three strings, msg1, msg2, and msg3 into the three columns defined for the window. var resWin = dw.createResultsWindow("Test Window", ["Frodo", "Sam", "Gollum"]); resWin.addItem(resWin, "3", "Description", null, null, null, ["msg1", "msg2", "msg3"]); resWin.addResultItem()Availability Dreamweaver 4. Description Adds a new results entry to the current Results window, based on the information in the file that the processfile() function processes. NOTE Use only on the built-in results window for Site Reports (dreamweaver.resultsPalette.siteReports). resWin.addResultItem() cannot be used with other built-in results windows or stand-alone results windows created with dreamweaver.createResultsWindow(). This function is only available in the processFile() callback of a site report. See "Reports" in Extending Dreamweaver for details on site reports. Arguments strFilePath, strIcon, strDisplay, strDesc, {iLineNo}, {iStartSel}, {iEndSel}
Returns Nothing. resWin.getItem()Availability Dreamweaver 4. Description Retrieves an array of items that include the name of the command that added the item and the same strings that were passed to the addItem() function. Arguments itemIndex
Returns An array of strings. The first element in the array is the name of the command that added the item; the remaining elements are the same strings that were passed to the addItem() function. resWin.getItemCount()Availability Dreamweaver 4. Description Retrieves the number of items in the list. Arguments None. Returns The number of items in the list. resWin.getSelectedItem()Availability Dreamweaver 4. Description Retrieves the index of the selected item. Arguments None. Returns The index of the currently selected item. resWin.setButtons()Availability Dreamweaver 4. Description Sets the buttons specified by the arrButtons argument. Arguments cmdDoc, arrButtons
Returns Nothing. resWin.setCallbackCommands()Availability Dreamweaver 4. Description Tells the Results window on which commands to call the processFile() method. If this function is not called, the command that created the Results window is called. Arguments arrCmdNames
Returns Nothing. resWin.setColumnWidths()Availability Dreamweaver 4. Description Sets the width of each column. Arguments arrWidth
Returns Nothing. resWin.setFileList()Availability Dreamweaver 4. Description Gives the Results window a list of files, folders, or both to call a set of commands to process. Arguments arrFilePaths, bRecursive
Returns Nothing. resWin.setSelectedItem()Availability Dreamweaver 4. Description Sets the selected item to the one specified by itemIndex. Arguments itemIndex
Returns The index of the previously selected item resWin.setTitle()Availability Dreamweaver 4. Description Sets the title of the window. Arguments strTitle
Returns Nothing. resWin.startProcessing()Availability Dreamweaver 4. Description Starts processing the file. Arguments None. Returns Nothing. resWin.stopProcessing()Availability Dreamweaver 4. Description Stops processing the file. Arguments None. Returns Nothing. Working with the built-in Results panel groupThese functions produce output in the Results panel group. The Results panel group displays tabbed reports on searches, source validation, sitewide reports, browser targets, console reports, FTP logging, and link checking. Working with specific child panelsThe following child panels are built-in Results windows that always exist in the Dreamweaver interface and can be accessed directly. Because these panels are Results windows, you can use the following methods that are defined for stand-alone Results windows:
For more information about using the resWin methods, see "Creating a Stand-alone Results window" on page 687. Working with the active child panelThe following general API functions apply to whichever child panel is active. Some child panels might ignore some of these functions. If the active child panel does not support the function, calling it has no effect. dreamweaver.resultsPalette.clear()Availability Dreamweaver MX. Description Clears the contents of the panel in focus. Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canClear()" on page 1083. dreamweaver.resultsPalette.Copy()Availability Dreamweaver MX. Description Sends a copied message to the window that is in focus (often used for the FTP logging window). Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canCopy()" on page 1084. dreamweaver.resultsPalette.cut()Availability Dreamweaver MX. Description Sends a cut message to the window in focus (often used for the FTP logging window). Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canCut()" on page 1084. dreamweaver.resultsPalette.Paste()Availability Dreamweaver MX. Description Sends a pasted message to the window in focus (often used for the FTP logging window). Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canPaste()" on page 1084. dreamweaver.resultsPalette.openInBrowserAvailability Dreamweaver MX. Description Sends a report (Site Reports, Browser Target Check, Validation, and Link Checker) to the default browser. Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canOpenInBrowser()" on page 1085. dreamweaver.resultsPalette.openInEditor()Availability Dreamweaver MX. Description Jumps to the selected line for specific reports (Site Reports, Browser Target Check, Validation, and Link Checker), and opens the document in the editor. Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canOpenInEditor()" on page 1085. dreamweaver.resultsPalette.save()Availability Dreamweaver MX. Description Opens the Save dialog box for a window that supports the Save function (Site Reports, Browser Target Check, Validation, and Link Checker). Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canSave()" on page 1085. dreamweaver.resultsPalette.selectAll()Availability Dreamweaver MX. Description Sends a Select All command to the window in focus. Arguments None. Returns Nothing. Enabler See "dreamweaver.resultsPalette.canSelectAll()" on page 1086. Server debuggingDreamweaver can request files from ColdFusion and display the response in its embedded browser. When the response returns from the server, Dreamweaver searches the response for a packet of XML that has a known signature. If Dreamweaver finds XML with that signature, it processes the XML and displays the contained information in a tree control. This tree displays information about the following items:
Additionally, the Server Debug panel can display debug data from other server models. To set up Dreamweaver to debug other server models, use the dreamweaver.resultsPalette.debugWindow.addDebugContextData() function. dreamweaver.resultsPalette.debugWindow.addDebugContextData()Availability Dreamweaver MX. Description Interprets a customized XML file that returns from the server that is specified in the Site Definition dialog box. The contents of the XML file display as tree data in the Server Debug panel, so you can use the Server Debug panel to evaluate server-generated content from various server models. Arguments treedata
For example: <serverdebuginfo> <context> <template><![CDATA[/ooo/master.cfm]]></template> <path><![CDATA[C:\server\wwwroot\ooo\master.cfm]]></path> <timestamp><![CDATA[0:0:0.0]]></timestamp> </context> <debugnode> <name><![CDATA[CGI]]></name> <icon><![CDATA[ServerDebugOutput/ColdFusion/CGIVariables.gif]]></icon> <debugnode> <name><![CDATA[Pubs.name.sourceURL]]></name> <icon><![CDATA[ServerDebugOutput/ColdFusion/Variable.gif]]></icon> <value><![CDATA[jdbc:macromedia:sqlserver:// name.macromedia.com:1111;databaseName=Pubs]]></value> </debugnode> </debugnode> <debugnode> <name><![CDATA[Element Snippet is undefined in class coldfusion.compiler .TagInfoNotFoundException]]></name> <icon><![CDATA[ServerDebugOutput/ColdFusion/Exception.gif]]></icon> <jumptoline linenumber="3" startposition="2" endposition="20"> <template><![CDATA[/ooo/master.cfm]]></template> <path><![CDATA[C:\Neo\wwwroot\ooo\master.cfm]]></path> </jumptoline> </debugnode> </serverdebuginfo> Returns Nothing. |
< Day Day Up > |