Reswin.getitem() – Adobe Dreamweaver API Reference CS5 User Manual
Page 152

147
DREAMWEAVER API REFERENCE
Workspace
Last updated 8/27/2013
Note: Use only on stand-alone results windows created with “
dreamweaver.createResultsWindow()
146. The
resWin.addItem()
function cannot be used with the built-in results windows, including Validation, Browser
Compatibility Check, or Site Reports.
Arguments
resultWindowObj, strIcon, strDesc, itemData, iStartSel, iEndSel, colNdata
•
The resultWindowObj argument is the object that the
createResultsWindow()
function returns
.
•
The strIcon argument is a string that specifies the path to the icon to use. To display a built-in icon, use a value "1"
through "10"instead of the fully qualified path of the icon. Specify "0" (zero) for no icon. The following table shows
the icons that correspond to the values of "1" through "10":
•
The strDesc argument is a detailed description of the item. Specify "0" if there is no description.
•
The itemData argument is a string you can use to store specific data about the item being added such as a document
line number.
•
The iStartSel argument is the start of selection offset in the file. Specify the value
null
if you are not specifying an
offset.
•
The iEndSel argument is the end of selection offset in the file. Specify the value
null
if you are not specifying an
offset.
•
The colNdata argument is an array of strings that provide the data for each column (that is, if there are 3 columns,
an array of 3 strings).
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.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.