Adobe Extending Dreamweaver CS4 Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Software Adobe Extending Dreamweaver CS4. Adobe Extending Dreamweaver CS4 User Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 387
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - DREAMWEAVER

Extending ADOBE® DREAMWEAVER® CS4

Página 2 - Copyright

4Chapter 2: Customizing DreamweaverIn addition to creating and using Adobe Dreamweaver extensions, you can customize Dreamweaver in many ways, which l

Página 3 - Contents

94EXTENDING DREAMWEAVER CS4User interfaces for extensions<html xmlns:MMStr ing="http://www.adobe.com /schemes/data/ string/"> <h

Página 4

95Chapter 6: The Dreamweaver Document Object ModelIn Adobe Dreamweaver, the Document Object Model (DOM) is a critically important structure for extens

Página 5

96EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelIf you are familiar with JavaScript in browsers, you can reference objects in the acti

Página 6

97EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelObject Properties Methods Eventswindow navigator •document •innerWidth •innerHeight •s

Página 7 - Chapter 1: Introduction

98EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object Modelform In addition to the properties that are available for all tags: tags:elements • (a

Página 8 - Creating an extension

99EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperties and methods of the document object The following table details the properti

Página 9 - Introduction

100EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperty or method Return valuenodeType • Node.DOCUMENT_NODEparentNode • null paren

Página 10 - Ways to customize Dreamweaver

101EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperties and methods of HTML The following table lists the properties and methods o

Página 11

102EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelProperties and methods of text objects Each contiguous block of text in an HTML docum

Página 12 - • String-delimited tags

103EXTENDING DREAMWEAVER CS4The Dreamweaver Document Object ModelThe dreamweaver and site objectsDreamweaver implements the standard objects that are

Página 13 - <tagspec>

5EXTENDING DREAMWEAVER CS4Customizing DreamweaverChange the appearance of a dialog box1 In Dreamweaver, select Edit > Preferences, and then select

Página 14 - Customizing Dreamweaver

104Chapter 7: Insert bar objectsYou can add items to the Insert bar to automate repetitive tasks for your users or even create dialog boxes for users

Página 15 - • Remove Extra Closing Tags

105EXTENDING DREAMWEAVER CS4Insert bar objects2 If Dreamweaver displays a dialog box in step 1, the user enters parameters for the object (such as the

Página 16

106EXTENDING DREAMWEAVER CS4Insert bar objects<insertbar>DescriptionThis tag signals the content of the Insert bar definition file. The </ins

Página 17 - <deleteditems>

107EXTENDING DREAMWEAVER CS4Insert bar objectsExample <menubutton id="DW_ImageMenu" name="Images" image="Common\imageme

Página 18 - Changing FTP mappings

108EXTENDING DREAMWEAVER CS4Insert bar objects<separator />DescriptionThis tag displays a vertical line on the Insert bar.Attributes{showIf}Exam

Página 19 - 5 Save the file

109EXTENDING DREAMWEAVER CS4Insert bar objectsshowIf="enabler"DescriptionThis attribute specifies that this button should appear on the Inse

Página 20

110EXTENDING DREAMWEAVER CS4Insert bar objectscommand="API_function"DescriptionInstead of referring Dreamweaver to an HTML file that contain

Página 21

111EXTENDING DREAMWEAVER CS4Insert bar objectsModifying the Insert barYou can move objects from one category to another, rename categories, and comple

Página 22

112EXTENDING DREAMWEAVER CS4Insert bar objectsCreate a new category1 Save a backup copy of insertbar.xml (with a name such as “insertbar.backup.xml”).

Página 23

113EXTENDING DREAMWEAVER CS4Insert bar objectsBecause this example performs text manipulation, you may want to explore some of the objects from the Te

Página 24 - Defining dynamic templates

6EXTENDING DREAMWEAVER CS4Customizing Dreamweaver2 Open Extensions.txt in a text editor. 3 Add a new line for each new file type. In capital letters,

Página 25 - See also

114EXTENDING DREAMWEAVER CS4Insert bar objectsWithin the objectTag() function, use dw.getFocus() to determine whether the Code view is the current vie

Página 26 - Providing localized strings

115EXTENDING DREAMWEAVER CS4Insert bar objects5 Save the file that now contains the JavaScript functions as Strikethrough.js in the Configuration/Obje

Página 27 - Customizing workspace layouts

116EXTENDING DREAMWEAVER CS4Insert bar objectsAdding a dialog boxYou can add a form to your object to let the user enter parameters before Dreamweaver

Página 28 - <document>

117EXTENDING DREAMWEAVER CS4Insert bar objects2 Save the file as Strikethrough.htm.3 Reload the extensions (see “Reloading extensions” on page 78).Te

Página 29 - <panelframe>

118EXTENDING DREAMWEAVER CS4Insert bar objects• Strike through the content they want to remove or make new content blueOrganize the files1 Create a ne

Página 30 - <panel>

119EXTENDING DREAMWEAVER CS4Insert bar objectsCreate the image1 Create a GIF file that is 18 x 18 pixels, which looks like the following figure:2 Save

Página 31

120EXTENDING DREAMWEAVER CS4Insert bar objects <button id="DW_Blue_Text" image="Editorial\AddBlue.gif name="Blue Text" fil

Página 32

121EXTENDING DREAMWEAVER CS4Insert bar objectsExample The following code tells Dreamweaver to check to see that the document contains a particular str

Página 33

122EXTENDING DREAMWEAVER CS4Insert bar objectsinsertObject() AvailabilityDreamweaver MX.Description This function is required if the objectTag() funct

Página 34

123EXTENDING DREAMWEAVER CS4Insert bar objectsobjectTag()DescriptionThe objectTag() and insertObject() functions are mutually exclusive: If both are d

Página 35

7EXTENDING DREAMWEAVER CS4Customizing DreamweaverString-delimited tags start with one string and end with another string. They are like empty HTML tag

Página 36 - About code hints

124EXTENDING DREAMWEAVER CS4Insert bar objectsReturnsDreamweaver expects a string of the form "widthInPixels,heightInPixels".The returned di

Página 37 - JavaScript code hinting

125Chapter 8: Browser compatibility check issues APIIn Adobe Dreamweaver, the browser compatibility check (BCC) feature helps you create page layouts

Página 38 - Customizing Code view

126EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIColAndColgroupCapturedByCaption.htm <!DOCTYPE HTML SYSTEM "-// //DWExtensi

Página 39

127EXTENDING DREAMWEAVER CS4Browser compatibility check issues API // if styles are declared for any colgroup or col // tag in thi

Página 40

128EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIDescriptionSearches the document for the combination of CSS and HTML that will trigg

Página 41 - Code hints tags

129EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIgetAffectedBrowserDisplayNames()AvailabilityDreamweaver CS3.DescriptionProvides Drea

Página 42 - <description>

130EXTENDING DREAMWEAVER CS4Browser compatibility check issues APIDescriptionProvides Dreamweaver with the name or a short description of the issue.Ar

Página 43

131Chapter 9: CommandsAdobe Dreamweaver commands can perform almost any kind of edit to a user’s current document, other open documents, or any HTML d

Página 44 - <function>

132EXTENDING DREAMWEAVER CS4CommandsAdding commands to the Commands menuDreamweaver automatically adds any files that are inside the Configuration/Com

Página 45 - <method>

133EXTENDING DREAMWEAVER CS4Commands <!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog"> <HTML> <HEAD

Página 46 - <parammenu>

8EXTENDING DREAMWEAVER CS4Customizing Dreamweaver• start_string specifies a delimiter that marks the beginning of a string-delimited tag. String-delim

Página 47 - <optionparammenu>

134EXTENDING DREAMWEAVER CS4CommandsDetermine whether the command should be enabled or dimmedThe first task in creating a command is to determine when

Página 48 - <property>

135EXTENDING DREAMWEAVER CS4CommandsOtherwise, canAcceptCommand() returns the value false and Dreamweaver dims the item, as shown in the following fig

Página 49 - <event>

136EXTENDING DREAMWEAVER CS4Commands function changeCase() { var uorl; // Check whether user requested uppercase or lowercase. if (document.forms

Página 50 - About code coloring

137EXTENDING DREAMWEAVER CS4CommandsThe changeCase() function first tests the property document.forms[0].elements[0].checked. The document.forms[0].el

Página 51 - <scheme>

138EXTENDING DREAMWEAVER CS4CommandscanAcceptCommand()DescriptionThis function determines whether the command is appropriate for the current selection

Página 52 - <blockEnd>

139EXTENDING DREAMWEAVER CS4CommandsExampleThe following instance of commandButtons() defines three buttons: OK, Cancel, and Help that appear at the u

Página 53 - <charStart>

140EXTENDING DREAMWEAVER CS4CommandsreceiveArguments()DescriptionThis function processes any arguments that pass from a menu item or from the dw.runCo

Página 54 - <commentEnd>

141Chapter 10: Menus and menu commandsAdobe Dreamweaver creates all its menus from the structure defined in the menus.xml file in the Dreamweaver Conf

Página 55 - <cssProperty/>

142EXTENDING DREAMWEAVER CS4Menus and menu commands<menubar>DescriptionProvides information about a menu bar in the Dreamweaver menu structure.A

Página 56 - <defaultTag>

143EXTENDING DREAMWEAVER CS4Menus and menu commandsContentsThis tag can contain one or more menuitem tags, and one or more separator tags. It can also

Página 57 - <entity/>

9EXTENDING DREAMWEAVER CS4Customizing DreamweaverHow custom tags appear in the Design viewThe way that custom tags appear in the Design view of the Do

Página 58 - <idCharRest>

144EXTENDING DREAMWEAVER CS4Menus and menu commands• arguments Provides arguments for Dreamweaver to pass to the code in the JavaScript file that you

Página 59 - <isLocked>

145EXTENDING DREAMWEAVER CS4Menus and menu commandsAttributes{app}app The name of the application in which the separator is shown. Not currently use

Página 60 - <numbers/>

146EXTENDING DREAMWEAVER CS4Menus and menu commandsAttributeskey, {app}, {platform}, {file}, {arguments}, {command}, id, {name}• key The key combinat

Página 61 - <sampleText>

147EXTENDING DREAMWEAVER CS4Menus and menu commandsExample <tool name="Hand tool" id="com.Macromedia.dreamweaver.tools.hand">

Página 62 - <stringStart>

148EXTENDING DREAMWEAVER CS4Menus and menu commandsExample <activate name="Switch to Hand tool" key="H" id="DWTools_Hand_A

Página 63 - <tagGroup>

149EXTENDING DREAMWEAVER CS4Menus and menu commandsCreate a submenu while moving a menu command1 Place the insertion point inside a menu (somewhere be

Página 64

150EXTENDING DREAMWEAVER CS4Menus and menu commandsIf you reassign a keyboard shortcut, change it on a printed copy of the matrix for future reference

Página 65 - Scheme processing

151EXTENDING DREAMWEAVER CS4Menus and menu commandsMenu commandsMenu commands make menus more flexible and dynamic. Menu commands can perform almost a

Página 66 - Wildcard characters

152EXTENDING DREAMWEAVER CS4Menus and menu commandsDelete a command you’ve created1 Select Commands > Edit Command List.A dialog box appears, listi

Página 67 - Maximum string length

153EXTENDING DREAMWEAVER CS4Menus and menu commands12 The dialog box remains visible until one of the scripts in the menu commands file calls the wind

Página 68 - Scheme precedence

10EXTENDING DREAMWEAVER CS4Customizing Dreamweaver• Deselect the Never Rewrite Code: In Files With Extensions option. (Deselecting this option lets Dr

Página 69 - Editing schemes

154EXTENDING DREAMWEAVER CS4Menus and menu commands function canAcceptCommand() { var selarray; if (arguments.length != 1) return false; var bResu

Página 70 - Code coloring examples

155EXTENDING DREAMWEAVER CS4Menus and menu commands function receiveArguments(){ if (arguments.length != 2) return; var whatToDo = arguments[0];

Página 71

156EXTENDING DREAMWEAVER CS4Menus and menu commandsA dynamic menu exampleThis example implements the Dreamweaver Preview In Browser submenu that displ

Página 72

157EXTENDING DREAMWEAVER CS4Menus and menu commands function getDynamicContent(itemID) { var browsers = null; var PIB = null; var i; var j=0; br

Página 73 - About Code validation

158EXTENDING DREAMWEAVER CS4Menus and menu commands function canAcceptCommand() { var PIB = dw.getBrowserList(); if (arguments[0] == 'primar

Página 74 - <css-support>

159EXTENDING DREAMWEAVER CS4Menus and menu commandsbHavePreviewTarget = false; else if (strTemp.indexOf("/") == -1) bHavePreviewTarget = f

Página 75 - <value>

160EXTENDING DREAMWEAVER CS4Menus and menu commandsreceiveArguments()Dreamweaver calls the receiveArguments() function to let the command process any

Página 76 - About Vertical Split view

161EXTENDING DREAMWEAVER CS4Menus and menu commands} else { // Otherwise, F12 or Ctrl+F12 was pressed, ask if the user wants // to specify a prima

Página 77 - About related files

162EXTENDING DREAMWEAVER CS4Menus and menu commandscanAcceptCommand()DescriptionDetermines whether the menu item is active or dimmed.Arguments{arg1},

Página 78

163EXTENDING DREAMWEAVER CS4Menus and menu commandsArgumentsmenuIDThe menuIDargument is the value of the id attribute in the menuitem tag that is asso

Página 79 - About Live view

11EXTENDING DREAMWEAVER CS4Customizing DreamweaverNote: To install extensions that all users can use in a multiuser operating system, you must be logg

Página 80

164EXTENDING DREAMWEAVER CS4Menus and menu commandsExample function isCommandChecked() { var bChecked = false; var cssStyle = arguments[0]; if (

Página 81

165EXTENDING DREAMWEAVER CS4Menus and menu commandssetMenuText()DescriptionSpecifies the text that should appear in the menu.Note: Do not use this fun

Página 82

166EXTENDING DREAMWEAVER CS4Menus and menu commandsExampleThe following example of windowDimensions() sets the dimensions of the Parameters dialog box

Página 83

167Chapter 11: ToolbarsYou can create a toolbar for Adobe Dreamweaver simply by creating a file that defines the toolbar and placing that file in the

Página 84 - Reloading extensions

168EXTENDING DREAMWEAVER CS4Toolbars• You can horizontally dock toolbars to the top or bottom of the frame window. • Toolbars remain a fixed size. A t

Página 85 - Extension APIs

169EXTENDING DREAMWEAVER CS4ToolbarsA simple toolbar command fileThis simple example implements a Title text box item as seen on the Dreamweaver Docum

Página 86 - Localizing an extension

170EXTENDING DREAMWEAVER CS4Toolbars function receiveArguments(newTitle) { var dom = dw.getDocumentDOM(); if (dom) dom.setTitle(newTitle); }Dream

Página 87 - Extending Dreamweaver

171EXTENDING DREAMWEAVER CS4ToolbarsAfter the declarations, the file consists of a single toolbarset tag, which contains any number of the following t

Página 88

172EXTENDING DREAMWEAVER CS4Toolbars• container="mainframe" or "document" Defaults to "mainframe". Specifies where the t

Página 89 - Editable select lists

173EXTENDING DREAMWEAVER CS4Toolbars<include/>DescriptionLoads toolbar items from the specified file before continuing to load the current file.

Página 90

12EXTENDING DREAMWEAVER CS4Customizing DreamweaverExample <deleteditems> <!-- item tags here --> </deleteditems><item>Descri

Página 91 - Database controls

174EXTENDING DREAMWEAVER CS4ToolbarsAttributesid, {showIf}• id="id_reference" Required. Must be the ID of an item that was previously define

Página 92

175EXTENDING DREAMWEAVER CS4ToolbarsToolbar item tagsEach type of toolbar item has its own tag and set of required and optional attributes. You can de

Página 93 - Tree controls

176EXTENDING DREAMWEAVER CS4ToolbarsFor a description of each attribute, see “Item tag attributes” on page 180.ContentsNone.ContainerThe toolbar tag

Página 94 - Creating a tree control

177EXTENDING DREAMWEAVER CS4ToolbarsExample <RADIOBUTTON ID="DW_CodeView" image="Toolbars/images/MM/codeView.gif" disabledIma

Página 95

178EXTENDING DREAMWEAVER CS4ToolbarsAttributes id, tooltip, file, enabled, checked, value, command, {showIf}, {label}, {width}, {domRequired}, {update

Página 96

179EXTENDING DREAMWEAVER CS4Toolbars<editcontrol>DescriptionAn edit control box is a text-editing box that executes its command when the user ch

Página 97

180EXTENDING DREAMWEAVER CS4ToolbarsExample <colorpicker id="Color_Example" image="Toolbars/images/colorpickerIcon.gif" disab

Página 98

181EXTENDING DREAMWEAVER CS4ToolbarsExample image="Toolbars/images/MM/codenav.gif"disabledImage="image_path"Optional. Dreamweaver

Página 99 - A Smart Object example

182EXTENDING DREAMWEAVER CS4ToolbarsmenuID="menu_id"This attribute is required for menu buttons and combo buttons, unless you specify the ge

Página 100

183EXTENDING DREAMWEAVER CS4Toolbarschecked="script"This attribute is required for check buttons and radio buttons. Dreamweaver ignores the

Página 101 - Object Model

13EXTENDING DREAMWEAVER CS4Customizing Dreamweaver HTML DmWr TEXT ASCIIIn both the FTPExtensionMap.txt file and FTPExtensionMapMac.txt file (Macintosh

Página 102 - The Dreamweaver DOM

184EXTENDING DREAMWEAVER CS4Toolbars• onEveryIdle executes regularly when the application is idle. This can be time-consuming because the enabler/chec

Página 103 - EXTENDING DREAMWEAVER CS4

185EXTENDING DREAMWEAVER CS4Toolbars <button id="DW_Undo" image="Toolbars/images/MM/undo.gif" disabledImage="Toolbars/

Página 104

186EXTENDING DREAMWEAVER CS4ToolbarsExample function canAcceptCommand() { return (dw.getDocumentDOM() != null); }getCurrentValue()AvailabilityDream

Página 105

187EXTENDING DREAMWEAVER CS4ToolbarsThe name getDynamicContent() is a misnomer because this function should be used even if the list of entries in the

Página 106

188EXTENDING DREAMWEAVER CS4ToolbarsReturnsDreamweaver expects a string that contains a menu ID, which is defined in the menus.xml file.Example functi

Página 107

189EXTENDING DREAMWEAVER CS4ToolbarsArgumentsNone.ReturnsDreamweaver expects a string that contains a comma-separated list of update handlers. For a c

Página 108

190EXTENDING DREAMWEAVER CS4Toolbars function isCommandChecked() { var bChecked = false; var style = arguments[0]; var textFormat = dw.getDocument

Página 109 - The site object

191EXTENDING DREAMWEAVER CS4ToolbarsreceiveArguments()AvailabilityDreamweaver MX.DescriptionProcesses any arguments that pass from a toolbar item. The

Página 110 - Chapter 7: Insert bar objects

192EXTENDING DREAMWEAVER CS4ToolbarsExample function showif() { var retval = false; var dom = dw.getDocumentDOM(); if(dom) { var view = dom.ge

Página 111 - Insert bar definition tags

193Chapter 12: ReportsAdobe Dreamweaver supports two types of reports: site reports and stand-alone reports.Site reportsYou use the reports API to cre

Página 112 - <insertbar>

Copyright© 2008 Adobe Systems Incorporated. All rights reserved.Extending Adobe® Dreamweaver® CS4 for Windows® and Mac OSIf this guide is distributed

Página 113 - <checkbutton />

14EXTENDING DREAMWEAVER CS4Customizing DreamweaverIf you need to create a new document type, you can either add your entry to the document definition

Página 114 - <separator />

194EXTENDING DREAMWEAVER CS4ReportsAt this point, Dreamweaver clears all items from the Site Reports tab of the Results panel. Dreamweaver calls the b

Página 115 - Insert bar objects

195EXTENDING DREAMWEAVER CS4ReportsWrite the JavaScript codeDreamweaver includes the Reports.js file. You can call any of the functions in Reports.js.

Página 116

196EXTENDING DREAMWEAVER CS4ReportsHow stand-alone reports work1 The custom command, which is the command you create to generate the report, opens a n

Página 117 - Modifying the Insert bar

197EXTENDING DREAMWEAVER CS4Reports <html> <head> <title>Standalone report example</title> <script src="Listimages.

Página 118

198EXTENDING DREAMWEAVER CS4Reports function stdaloneresultwin() { var curDOM = dw.getDocumentDOM("document"); var tagList = curDOM.getEl

Página 119 - Create the HTML file

199EXTENDING DREAMWEAVER CS4ReportsArgumentsstrFilePathThe strFilePath argument is the full path and filename of the file to process.ReturnsDreamweave

Página 120

200EXTENDING DREAMWEAVER CS4ReportsDescriptionDefines the buttons that should appear on the right side of the Options dialog box and their behavior wh

Página 121

201EXTENDING DREAMWEAVER CS4ReportsArgumentsplatformThe value of the platform argument is either "macintosh" or "windows", dependi

Página 122 - Adding a dialog box

202Chapter 13: Tag libraries and editorsDreamweaver stores information about each tag, including all tag attributes, in a set of subfolders that resid

Página 123

203EXTENDING DREAMWEAVER CS4Tag libraries and editorsTag library file formatA tag library consists of a single root file, the TagLibraries.vtm file th

Página 124 - 2 Add the following code:

15EXTENDING DREAMWEAVER CS4Customizing Dreamweaver <?xml version="1.0" encoding="utf-8"?> <documenttypes xmlns:MMStr

Página 125

204EXTENDING DREAMWEAVER CS4Tag libraries and editorsThe taglibrary tag groups one or more tags into a tag library. When you import tags or create a n

Página 126 - The objects API functions

205EXTENDING DREAMWEAVER CS4Tag libraries and editorsTo define tags, Dreamweaver uses a modified version of the VTML file format. The following exampl

Página 127

206EXTENDING DREAMWEAVER CS4Tag libraries and editorsNote: In versions before Dreamweaver MX, tag information is stored in the Configuration/TagAttrib

Página 128

207EXTENDING DREAMWEAVER CS4Tag libraries and editors <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>

Página 129

208EXTENDING DREAMWEAVER CS4Tag libraries and editorsA simple example of creating a new tag editorThe examples in this section use cfweather, a hypoth

Página 130

209EXTENDING DREAMWEAVER CS4Tag libraries and editorsIf Dreamweaver cannot find the TagLibraries.vtm file in the user Configuration folder, it searche

Página 131 - An Issues example

210EXTENDING DREAMWEAVER CS4Tag libraries and editors <!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog"> <h

Página 132

211EXTENDING DREAMWEAVER CS4Tag libraries and editors<table border="0" cellspacing="4"> <tr> <td valign="bas

Página 133 - The issues API functions

212EXTENDING DREAMWEAVER CS4Tag libraries and editorsThe tag editor API functionsIn order to create a new tag editor, you must provide an implementati

Página 134

213EXTENDING DREAMWEAVER CS4Tag libraries and editorsReturnsDreamweaver expects a Boolean value: true if the input for HTML form elements is valid; fa

Página 135

16EXTENDING DREAMWEAVER CS4Customizing Dreamweaver internaltype Yes A broad classification of how Dreamweaver treats a file. The internaltype identif

Página 136

214Chapter 14: Property inspectorsThe Property inspector is perhaps the most familiar floating panel in the interface. The Property inspector is indis

Página 137 - Chapter 9: Commands

215EXTENDING DREAMWEAVER CS4Property inspectors• The serverModel element (optional) indicates the server model of the Property inspector. The server m

Página 138 - A simple command example

216EXTENDING DREAMWEAVER CS4Property inspectorsA simple Property inspector exampleThe following Property inspector inspects the marquee tag, which is

Página 139 - Writing the JavaScript code

217EXTENDING DREAMWEAVER CS4Property inspectors <!-- Specify the image that will appear in the Property inspector --> <SPAN ID="image&q

Página 140 - 1 Create a new blank file

218EXTENDING DREAMWEAVER CS4Property inspectors function inspectSelection(){ // Get the DOM of the current document. var theDOM = dw.getDocumentDOM(

Página 141 - 3 Save the file

219EXTENDING DREAMWEAVER CS4Property inspectorsCreate the imageYou can optionally create the image that appears in the Property inspector.1 Create an

Página 142 - Commands

220EXTENDING DREAMWEAVER CS4Property inspectors function canInspectSelection(){3 var theDOM = dw.getDocumentDOM(); var theObj = theDOM.getSelectedNo

Página 143 - The commands API functions

221EXTENDING DREAMWEAVER CS4Property inspectors function inspectSelection(){ var dom = dreamweaver.getDocumentDOM(); var theObj = dom.getSelectedNod

Página 144

222Chapter 15: Floating panelsYou can create floating panels or inspectors without the size and layout limitations of Property inspectors. A custom Pr

Página 145

223EXTENDING DREAMWEAVER CS4Floating panelsWhen one of the files inside the Configuration folder calls the dw.getFloaterVisibility(floaterName), dw.se

Página 146

17EXTENDING DREAMWEAVER CS4Customizing DreamweaverNote: When the user saves a new document, Dreamweaver examines the list of extensions for the curren

Página 147 - The menus.xml file

224EXTENDING DREAMWEAVER CS4Floating panels <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>

Página 148 - <menu>

225EXTENDING DREAMWEAVER CS4Floating panelsselectionChanged(): is a script marker selected?The selectionChanged() function determines whether a script

Página 149 - <menuitem>

226EXTENDING DREAMWEAVER CS4Floating panels2 Enter the following code in the header section of the file. function selectionChanged(){ /* get the sele

Página 150 - <separator>

227EXTENDING DREAMWEAVER CS4Floating panelsCreating a menu itemIt is not sufficient to save the Script Editor code in the Configuration/Floaters folde

Página 151 - <shortcut>

228EXTENDING DREAMWEAVER CS4Floating panelsExample // the following instance of displayHelp() opens // in a browser a file that explains how to use

Página 152 - <tool>

229EXTENDING DREAMWEAVER CS4Floating panelsArgumentsNone.ReturnsDreamweaver expects a string containing the words "left", "right",

Página 153 - <activate>

230EXTENDING DREAMWEAVER CS4Floating panelsReturnsDreamweaver expects a string of the form "floaterName1,floaterName2,...floaterNameN".Examp

Página 154 - <override>

231EXTENDING DREAMWEAVER CS4Floating panelsisResizable()AvailabilityDreamweaver 4. DescriptionDetermines whether a user can resize a floating panel. I

Página 155 - Change keyboard shortcuts

232EXTENDING DREAMWEAVER CS4Floating panels function selectionChanged(){ /* get the selected node */ var theDOM = dw.getDocumentDOM(); var theNode

Página 156 - Menus and menu commands

233EXTENDING DREAMWEAVER CS4Floating panels /* create a flag that specifies whether an edit is being processed, and set it to false.*/ document.runni

Página 157 - Menu commands

18EXTENDING DREAMWEAVER CS4Customizing DreamweaverDefining dynamic templatesYou can create templates that are based on dynamic document types. These t

Página 158 - How menu commands work

234Chapter 16: BehaviorsThe term behavior refers to the combination of an event and an action. onClick, onLoad, and onSubmit are examples of events. C

Página 159 - A simple menu command example

235EXTENDING DREAMWEAVER CS4Behaviors4 Dreamweaver displays a dialog box that contains the BODY elements of the Action file. If the Action file’s body

Página 160

236EXTENDING DREAMWEAVER CS4BehaviorsCreate the behavior extensionThe following code presents a relatively simple example. The code checks the brand o

Página 161

237EXTENDING DREAMWEAVER CS4Behaviorsvar ieURL = unescape(argArray[2]); document.theForm.nsURL.value = nsURL; document.theForm.ieURL.value = ieURL;

Página 162 - A dynamic menu example

238EXTENDING DREAMWEAVER CS4BehaviorsCreate the HTML files to browse (deprecated)Create the HTML files to browse, the file to go to if the browser is

Página 163

239EXTENDING DREAMWEAVER CS4Behaviors10 Click OK.Dreamweaver adds the specified JavaScript to the whichbrowser.htm file, so that the file appears as f

Página 164

240EXTENDING DREAMWEAVER CS4BehaviorsThe argument is a unique identifier among all instances of all behaviors in the user’s document. Its format is fu

Página 165

241EXTENDING DREAMWEAVER CS4BehaviorsReturnsDreamweaver expects either a string that contains the JavaScript functions or a string that contains the n

Página 166

242EXTENDING DREAMWEAVER CS4BehaviorsExampleThe following instance of the canAcceptBehavior() function returns a list of preferred events for the beha

Página 167

243EXTENDING DREAMWEAVER CS4BehaviorsReturnsDreamweaver expects nothing.identifyBehaviorArguments()DescriptionThis function identifies arguments from

Página 168

19EXTENDING DREAMWEAVER CS4Customizing Dreamweaverhard disk:\Users\username\AppData\Roaming\Adobe\Dreamweaver CS4\ConfigurationMac OS X platform uses

Página 169

244EXTENDING DREAMWEAVER CS4Behaviors function identifyBehaviorArguments(fnCallStr) { var listOfArgTypes; var itemArray = dreamweaver.getTokens(fnCa

Página 170

245EXTENDING DREAMWEAVER CS4BehaviorsExampleThe following instance of the inspectBehavior() function, taken from the Display Status Message.htm file,

Página 171

246Chapter 17: Server behaviorsAdobe® Dreamweaver® provides users with an interface for adding server behaviors into their documents to perform server

Página 172

247EXTENDING DREAMWEAVER CS4Server behaviorsDreamweaver architectureWhen you use the Server Behavior Builder to create a Dreamweaver-specific extensio

Página 173 - Chapter 11: Toolbars

248EXTENDING DREAMWEAVER CS4Server behaviors <participant> <quickSearch><![CDATA[MM_paramName]]></quickSearch> <insertTex

Página 174 - How toolbar commands work

249EXTENDING DREAMWEAVER CS4Server behaviorsDefining the new server behaviorNote: If the Server Behaviors panel is not open and visible, select the Wi

Página 175 - A simple toolbar command file

250EXTENDING DREAMWEAVER CS4Server behaviorsWhen the findServerBehaviors() function creates a behavior object, it usually sets the four properties (in

Página 176 - The toolbar definition file

251EXTENDING DREAMWEAVER CS4Server behaviors• When the user selects a server behavior and uses the Cut or Copy commands, Dreamweaver passes the object

Página 177 - <toolbar>

252EXTENDING DREAMWEAVER CS4Server behaviorsobject that belongs to Recordset1 cannot be found, the incomplete property is set to the value true so tha

Página 178 - Toolbars

253EXTENDING DREAMWEAVER CS4Server behaviorsArgumentsserverBehaviorThe serverBehavior JavaScript object represents the behavior; it is necessary to mo

Página 179 - <itemref/>

20EXTENDING DREAMWEAVER CS4Customizing DreamweaverProviding localized stringsWithin a document type definition file, the <title> and <descrip

Página 180 - <separator/>

254EXTENDING DREAMWEAVER CS4Server behaviorsArgumentsserverBehavior• The serverBehavior JavaScript object represents the behavior.ReturnsDreamweaver e

Página 181 - Toolbar item tags

255EXTENDING DREAMWEAVER CS4Server behaviorsReturnsDreamweaver expects an array of JavaScript objects; the length of the array is equal to the number

Página 182 - <radiobutton>

256EXTENDING DREAMWEAVER CS4Server behaviorsReturnsDreamweaver expects a Boolean value: true if the behavior pastes successfully from the Clipboard; f

Página 183 - <dropdown>

257EXTENDING DREAMWEAVER CS4Server behaviorsArgumentsparamObj, sbObj• The paramObj argument is the object that contains the user settings. • The sbObj

Página 184 - <combobox>

258EXTENDING DREAMWEAVER CS4Server behaviorsEDML filesYou must maintain Dreamweaver coding conventions when you edit a file. Pay attention to the depe

Página 185 - <colorpicker>

259EXTENDING DREAMWEAVER CS4Server behaviorsEDML structureYou should use a unique filename to identify your server behavior group. If only one group f

Página 186 - Item tag attributes

260EXTENDING DREAMWEAVER CS4Server behaviorsRequiredYes.<group> attributesThe following items are valid attributes of the group tag.versionDescr

Página 187

261EXTENDING DREAMWEAVER CS4Server behaviorsdataSourceDescriptionThis advanced feature supports new data sources that can be added to Dreamweaver.Mult

Página 188

262EXTENDING DREAMWEAVER CS4Server behaviorsRequiredNo.ValueThe value is a unique string that determines which group to apply, as shown in the followi

Página 189

263EXTENDING DREAMWEAVER CS4Server behaviorsTypeBlock tag.RequiredYes.<groupParticipants> attributesThe following items are valid attributes of

Página 190 - • Clicks a button

21EXTENDING DREAMWEAVER CS4Customizing DreamweaverDreamweaver does not let document types that are not associated with a server model share file exten

Página 191

264EXTENDING DREAMWEAVER CS4Server behaviors<groupParticipant> attributesThe following items are valid attributes of the groupParticipant tag.na

Página 192

265EXTENDING DREAMWEAVER CS4Server behaviors• The multiple value indicates that the participant is optional and multiple copies of it can be associate

Página 193

266EXTENDING DREAMWEAVER CS4Server behaviorsTypeAttribute.RequiredNo.<quickSearch> DescriptionThis tag is a simple search string that is used fo

Página 194

267EXTENDING DREAMWEAVER CS4Server behaviorsRequiredNo.ValueThe value is the text to insert in the document. If any parts of the text need customizing

Página 195

268EXTENDING DREAMWEAVER CS4Server behaviors• The belowHTML[+weight] value is similar to the aboveHTML value, except that participants are added below

Página 196

269EXTENDING DREAMWEAVER CS4Server behaviorsRequiredThis attribute is required only if the insert location contains the word node.ValueThe tagtype_Tag

Página 197

270EXTENDING DREAMWEAVER CS4Server behaviorsParentsearchPatternsTypeAttribute.RequiredYes.Valuesdirective, tag+tagName, tag+*, comment, text• The dire

Página 198

271EXTENDING DREAMWEAVER CS4Server behaviorsParentsearchPatternsTypeBlock tag.RequiredYes.ValuessearchString, /regularExpression/, <empty>• The

Página 199 - Chapter 12: Reports

272EXTENDING DREAMWEAVER CS4Server behaviorsparamNamesDescriptionThis attribute is a comma-separated list of parameter names whose values are being ex

Página 200 - A simple site report example

273EXTENDING DREAMWEAVER CS4Server behaviorsValuesall, attribute+attribName, tagOnly, innerOnly• The all value (default) searches the entire tag that

Página 201 - Stand-alone reports

22EXTENDING DREAMWEAVER CS4Customizing DreamweaverContainerNone.Example <panelset> <!-- panelset tags here --> </panelset><appl

Página 202 - How stand-alone reports work

274EXTENDING DREAMWEAVER CS4Server behaviorsThe search patterns must identify the participant and extract several parameters. However, if a parameter

Página 203 - Write the JavaScript code

275EXTENDING DREAMWEAVER CS4Server behaviorsValuesThe value is a regular expression that finds a parameter between two parenthetical subexpressions, i

Página 204 - The reports API functions

276EXTENDING DREAMWEAVER CS4Server behaviorsparamNameDescriptionThis attribute indicates the name of the parameter whose value is used to update the p

Página 205

277EXTENDING DREAMWEAVER CS4Server behaviorsParentdeleteTypeAttribute.RequiredNo.Valuesall, none, tagOnly, innerOnly, attribute+attribName, attribute+

Página 206

278EXTENDING DREAMWEAVER CS4Server behaviors<searchPatterns>DescriptionThis tag lets Dreamweaver find each specified instance in a document. If

Página 207

279EXTENDING DREAMWEAVER CS4Server behaviors<translation> attributesThe following items are valid attributes of the translation tag.whereToSearc

Página 208

280EXTENDING DREAMWEAVER CS4Server behaviorsRequiredYes.Valuesdynamic data, dynamic image, dynamic source, tabbed region start, tabbed region end, cus

Página 209 - Tag library file format

281EXTENDING DREAMWEAVER CS4Server behaviorsRequiredNo.ValuesThe tagName value is a valid tag name. It should be unique to prevent conflicts with know

Página 210

282EXTENDING DREAMWEAVER CS4Server behaviors <attribute> mmTranslatedValueDynValue="VALUE={@@rs@@.@@col@@}" </attribute><di

Página 211

283EXTENDING DREAMWEAVER CS4Server behaviorsServer behavior techniquesThis section covers the common and advanced techniques that create and edit serv

Página 212 - The Tag Chooser

23EXTENDING DREAMWEAVER CS4Customizing DreamweaverContainerThis tag must be contained in a panelset tag.Example <panelset> <document rect=&q

Página 213

284EXTENDING DREAMWEAVER CS4Server behaviorsOptional search patternsSometimes you want to identify a participant even if some parameters are not found

Página 214

285EXTENDING DREAMWEAVER CS4Server behaviors <% //test_p1 %> <% //test_p2 %> <html>These participants are found and matched, and T

Página 215 - Create a tag editor UI

286EXTENDING DREAMWEAVER CS4Server behaviors <% total = Recordset1.Fields.Item("itemPrice").Value * 1.0825 %> <% total = Recordset

Página 216 - Tag libraries and editors

287EXTENDING DREAMWEAVER CS4Server behaviors <searchPatterns whereToSearch="tag+cfinclude"> <searchPattern paramNames="includ

Página 217 - Add a tag to Tag Chooser

288EXTENDING DREAMWEAVER CS4Server behaviors <quickSearch>Response.Write</quickSearch> <searchPatterns whereToSearch="directive&q

Página 218 - The tag editor API functions

289EXTENDING DREAMWEAVER CS4Server behaviorsAnother approach is to remove the entire tag; typing <delete deleteType="tagOnly"/> delete

Página 219

290Chapter 18: Data sourcesData source files are stored in the Configuration/DataSources/ServerModelName folder. Dreamweaver currently supports the fo

Página 220 - Property inspector files

291EXTENDING DREAMWEAVER CS4Data sources3 Dreamweaver goes through each file in the appropriate server model folder, calling the findDynamicSources()

Página 221 - Property inspectors

292EXTENDING DREAMWEAVER CS4Data sourcesA simple data source exampleThis extension adds a custom data source to the Bindings panel for Adobe ColdFusio

Página 222 - Create the user interface

293EXTENDING DREAMWEAVER CS4Data sourcesFor the MyDatasource Variable, you want Dreamweaver to insert the ColdFusion code <cfoutput>#MyXML.varia

Página 223

iiiContentsChapter 1: IntroductionAbout extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 224

24EXTENDING DREAMWEAVER CS4Customizing Dreamweaver<panelcontainer>DescriptionDescribes an entire panel group.Attributesexpanded, title,{ height,

Página 225 - Test the Property inspector

294EXTENDING DREAMWEAVER CS4Data sources{ alert(MM.MSG_DefineMyDatasource); } } } function findDynamicSources() { var retList = new Array();

Página 226

295EXTENDING DREAMWEAVER CS4Data sourcesvar paramObj = new Object(); paramObj.bindingName = bindingName; var retStr = extPart.getInsertString("

Página 227

296EXTENDING DREAMWEAVER CS4Data sourcesTo provide a dialog box for the user, create a set of command files: a command definition file in HTML and a c

Página 228 - Chapter 15: Floating panels

297EXTENDING DREAMWEAVER CS4Data sources //******************* API ********************** function commandButtons(){ return new Array(MM.BTN_OK,&q

Página 229 - Creating the floating panels

298EXTENDING DREAMWEAVER CS4Data sources4 Drag the variable to your document, and Dreamweaver inserts the appropriate code from the EDML file:The data

Página 230

299EXTENDING DREAMWEAVER CS4Data sourcesFor example, in Dreamweaver, if the selection is a recordset or command, the deleteDynamicSource() function ca

Página 231 - Floating panels

300EXTENDING DREAMWEAVER CS4Data sourcesArgumentssourceName, bindingName• The sourceName argument is the name of the top-level node to which the child

Página 232

301EXTENDING DREAMWEAVER CS4Data sourcesgenerateDynamicDataRef()AvailabilityDreamweaver UltraDev 1.DescriptionThis function generates the dynamic data

Página 233 - Creating a menu item

302EXTENDING DREAMWEAVER CS4Data sources• The name property is the name of the server behavior that is associated with the data source, if one exists.

Página 234

303Chapter 19: Server formats“Data sources” on page 290 discusses how Adobe Dreamweaver inserts dynamic data into a user document by adding a server

Página 235

25EXTENDING DREAMWEAVER CS4Customizing DreamweaverAttributesid, visibleTab• id is a number that indicates the ID for the panel. The following table co

Página 236

304EXTENDING DREAMWEAVER CS4Server formats• The expression=regexp attribute is a regular expression that matches the dynamic data objects that use thi

Página 237

305EXTENDING DREAMWEAVER CS4Server formatsScenarios in which the data formatting functions are calledThe data formatting functions are called in the f

Página 238 - About performance

306EXTENDING DREAMWEAVER CS4Server formatsThe applyFormat() function should use the DOM to add function declarations to the top of the user’s document

Página 239

307EXTENDING DREAMWEAVER CS4Server formatsUse the DOM with the deleteFormat() function to remove the function declaration from the top of the current

Página 240 - Chapter 16: Behaviors

308EXTENDING DREAMWEAVER CS4Server formatsDescriptionInitializes form controls when a user edits a format in the Edit Format List dialog box. Argument

Página 241 - A simple behavior example

309Chapter 20: ComponentsAdobe Dreamweaver supports the creation of many of the most popular types of components. In addition, Dreamweaver lets you ex

Página 242 - Create the behavior extension

310EXTENDING DREAMWEAVER CS4ComponentsIn some cases, writing some JavaScript code that calls certain component-related function, is a must for alterin

Página 243 - Behaviors

311EXTENDING DREAMWEAVER CS4ComponentsNote: Keep the same prefix throughout all the files that correspond to one component so that each file and its c

Página 244

312EXTENDING DREAMWEAVER CS4ComponentsFor example, the following WebServicesClass node has web methods as its children: this.name = "TrafficLocat

Página 245 - The behaviors API functions

313EXTENDING DREAMWEAVER CS4ComponentsgetContextMenuId()AvailabilityDreamweaver MX.Description Returns the context menu ID for the component type. Eve

Página 246

26EXTENDING DREAMWEAVER CS4Customizing DreamweaverExample <panelset> <panelframe rect="196 453 661 987" visible="true" d

Página 247

314EXTENDING DREAMWEAVER CS4Components <menubar xmlns:MMString="http://www.macromedia.com/schemes/dat/string/" name="" id="

Página 248

315EXTENDING DREAMWEAVER CS4Components function getCodeVi e wDropCode(compone nt Rec ) { var codeToDrop=""; if (componentRec) {

Página 249

316EXTENDING DREAMWEAVER CS4Components• An "Event:CreateSite" handler opens a dialog box to create a new site.• An "Event:SetDocType&qu

Página 250

317EXTENDING DREAMWEAVER CS4ComponentsDescriptionDreamweaver calls this function before the Components tab appears. Dreamweaver then calls the getSetu

Página 251

318EXTENDING DREAMWEAVER CS4Components function handleDesignViewDrop(componentRec) { var bHandled = false; if (componentRec) { if ((componentRec.

Página 252 - Chapter 17: Server behaviors

319EXTENDING DREAMWEAVER CS4Components function handleDoubleClick(componentRec) { var selectedObj = dw.serverComponentsPalette.getSelectedNode(); i

Página 253 - Dreamweaver architecture

320EXTENDING DREAMWEAVER CS4ComponentsArgumentsNone.ReturnsAn array of toolbar buttons in left-to-right order.ExampleThe following example assigns pro

Página 254 - The script file

321EXTENDING DREAMWEAVER CS4ComponentsplusButton.pressedImage = PLUSDROPBUTTONDOWN; plusButton.disabledImage = PLUSDROPBUTTONUP; plusButton.toolS

Página 255 - Defining the code to insert

322Chapter 21: Server modelsServer models are the technologies that run scripts on a server. When users define a new site, they can identify the serve

Página 256 - Server behaviors

323EXTENDING DREAMWEAVER CS4Server modelsArgumentsdomThe dom argument is the Adobe document object, which is returned by the dreamweaver.getDocumentDO

Página 257 - The server behavior API

27EXTENDING DREAMWEAVER CS4Customizing DreamweaverChanging keyboard shortcut mappingsDreamweaver includes many keyboard shortcuts to Dreamweaver featu

Página 258

324EXTENDING DREAMWEAVER CS4Server modelsDescriptionThis function returns an object that describes the method and array signatures that the scripting

Página 259

325EXTENDING DREAMWEAVER CS4Server modelsDescriptionThis function returns a JavaScript object that can be accessed from within the JavaScript code. Yo

Página 260

326EXTENDING DREAMWEAVER CS4Server modelsReturnsDreamweaver expects an array of strings that represent the supported scripting languages. getServerMod

Página 261

327EXTENDING DREAMWEAVER CS4Server modelsDescriptionThis function returns the name that should appear in the user interface for this server model. You

Página 262

328EXTENDING DREAMWEAVER CS4Server modelsgetVersionArray() AvailabilityDreamweaver UltraDev 1, deprecated in Dreamweaver MX.DescriptionThis function r

Página 263

329Chapter 22: Data translatorsData translators translate specialized markups into code that Adobe Dreamweaver can read and display. Server-side inclu

Página 264 - EDML files

330EXTENDING DREAMWEAVER CS4Data translators• Selects Modify > Convert > Convert Tables To AP Divs• Selects Modify > Convert > Convert AP

Página 265 - Group EDML file tags

331EXTENDING DREAMWEAVER CS4Data translatorsTranslating more than one attribute at a timeThe mmTranslatedValue attribute can contain more than one val

Página 266 - <group> attributes

332EXTENDING DREAMWEAVER CS4Data translators <MM:BeginLock translatorClass="translatorClass" ¬ type="tagNameOrType" depFiles=&

Página 267

333EXTENDING DREAMWEAVER CS4Data translators <script language="javascript"> <!-- function foo() { alert('<bean:message k

Página 268 - <groupParticipants>

28EXTENDING DREAMWEAVER CS4Customizing DreamweaverCreate a keyboard mappings file1 Make a copy of one of the keyboard mappings files in the Configurat

Página 269 - <groupParticipant>

334EXTENDING DREAMWEAVER CS4Data translators if (theSelection.nodeType == node.ELEMENT_NODE && ¬ theSelection.getAttribute('type')

Página 270

335EXTENDING DREAMWEAVER CS4Data translators // Assemble the new include comment. radioStr and URL are // variables defined earlier in the code. new

Página 271 - Participant EDML files

336EXTENDING DREAMWEAVER CS4Data translators5 Restart Dreamweaver, and select your translator command from the Commands menu. When you click OK, the t

Página 272 - <insertText>

337EXTENDING DREAMWEAVER CS4Data translators <html> <head> <title>Conditional Translator</title> <meta http-equiv="

Página 273 - <insertText> attributes

338EXTENDING DREAMWEAVER CS4Data translatorsend = outStr.indexOf(' #>',start); equalSign = outStr.indexOf('="<# if',ba

Página 274

339EXTENDING DREAMWEAVER CS4Data translatorsstart = outStr.indexOf('<# if',end); } // Return the translated string. return outStr }

Página 275 - <searchPatterns>

340EXTENDING DREAMWEAVER CS4Data translators <html> <head> <title>Kent Tag Translator</title> <meta http-equiv="Con

Página 276 - <searchPattern>

341EXTENDING DREAMWEAVER CS4Data translators // locking tags. For more information on the repacement operation, see // the comments in the replaceKe

Página 277

342EXTENDING DREAMWEAVER CS4Data translatorsvar hour = today.getUTCHours(); // The current hour in GMT, based on the

Página 278

343EXTENDING DREAMWEAVER CS4Data translators}else{ imageRef = "images/kent_hardAtWorkOnWin.jpg"; } }else{ imageRef = "images/kent

Página 279

29EXTENDING DREAMWEAVER CS4Customizing Dreamweaver <shortcutset language="French"> <shortcut key="Cmd+[" newkey="Cm

Página 280 - <updatePattern>

344EXTENDING DREAMWEAVER CS4Data translators6 The regExps string specifies a regular expression that you can check. The array should contain the same

Página 281

345EXTENDING DREAMWEAVER CS4Data translatorsDescriptionDreamweaver performs two translation passes. The first pass goes through all the translators an

Página 282 - <delete> attributes

346EXTENDING DREAMWEAVER CS4Data translators function translateMarkup(docName, siteRoot, docContent){ var translatedString = ""; if (docCo

Página 283 - <translator>

347Chapter 23: C-level extensibility The C-level extensibility mechanism lets you implement Adobe Dreamweaver extensibility files using a combination

Página 284 - <translation>

348EXTENDING DREAMWEAVER CS4C-level extensibility JSBool readContentsOfFile(JSContext *cx, JSObject *obj, unsigned int ¬ argc, jsval *argv, jsval *r

Página 285

349EXTENDING DREAMWEAVER CS4C-level extensibilityNote: The library can be implemented in either C or C++, but the file that contains the MM_Init() fun

Página 286 - <openTag>

350EXTENDING DREAMWEAVER CS4C-level extensibilitytypedef JSBool (*JSNative)(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)

Página 287 - <attribute>

351EXTENDING DREAMWEAVER CS4C-level extensibilityArgumentsJSContext *cx, JSVal v, unsigned integer *pLength• The *cx argument is the opaque JSContext

Página 288 - <closeTag>

352EXTENDING DREAMWEAVER CS4C-level extensibilityJSBool JS_ValueToBoolean()DescriptionThis function extracts a function argument from a JSVal structur

Página 289 - Server behavior techniques

353EXTENDING DREAMWEAVER CS4C-level extensibility• The *pLengthargument is a pointer to an unsigned integer. This function sets *pLength equal to the

Página 290

30Chapter 3: Customizing Code viewAdobe Dreamweaver uses two devices in Code view that help you enter code quickly and make your code readable and acc

Página 291

354EXTENDING DREAMWEAVER CS4C-level extensibilityNote: The JS_UCStringToValue() method is like the JSBool JS_StringToValue() in every way, except tha

Página 292 - Search pattern resolution

355EXTENDING DREAMWEAVER CS4C-level extensibilityJSVal JS_ObjectToValue()DescriptionThis function stores an object return value in a JSVal. Use JS_ Ne

Página 293 - Updating server behaviors

356EXTENDING DREAMWEAVER CS4C-level extensibilitylong JS_GetArrayLength()DescriptionGiven a pointer to an array object, this function gets the number

Página 294 - Deleting server behaviors

357EXTENDING DREAMWEAVER CS4C-level extensibilityReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.JSBool JS_ExecuteScript

Página 295

358EXTENDING DREAMWEAVER CS4C-level extensibilityFile access and multiuser configuration APIAdobe recommends that you always use the file access and m

Página 296 - Chapter 18: Data sources

359EXTENDING DREAMWEAVER CS4C-level extensibilityNote: Most JavaScript extensions need not be changed to write to the user Configuration folder. Only

Página 297 - Data sources

360EXTENDING DREAMWEAVER CS4C-level extensibilityReturnsJSObject is an array that contains the list of files or folders in either the user Configurati

Página 298 - A simple data source example

361EXTENDING DREAMWEAVER CS4C-level extensibilityNote: If you want to read the file before writing to it, open the file in "read" mode. When

Página 299 - 2 Enter the following:

362EXTENDING DREAMWEAVER CS4C-level extensibility• The unsigned long *modtime argument is the address of an integer in which the function returns the

Página 300

363EXTENDING DREAMWEAVER CS4C-level extensibilityExample char *dwConfig = "file:///c|/Program Files/Adobe/Adobe Dreamweaver CS3/ Configuration/

Página 301 - MyDatasource Variable

31EXTENDING DREAMWEAVER CS4Customizing Code view• The description for each menu group The description appears in the Preferences dialog box for the co

Página 302

364EXTENDING DREAMWEAVER CS4C-level extensibilityReturnsA Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.Example char *dwConfig

Página 303 - Test the new data source

365EXTENDING DREAMWEAVER CS4C-level extensibility• The Sample.c example file defines the computeSum() function.• The Sample.mak make file lets you bui

Página 304

366EXTENDING DREAMWEAVER CS4C-level extensibility function objectTag() { // Return the html tag that should be inserted alert(Sample.computeSum(2,2)

Página 305

367Chapter 24: The Shared folderThe Shared folder is the central repository for utility functions, classes, and images that are commonly used by all e

Página 306

368EXTENDING DREAMWEAVER CS4The Shared folderThe MM folderThe MM folder contains the shared scripts, images, and classes used by the extensions that c

Página 307

369EXTENDING DREAMWEAVER CS4The Shared folderThe Scripts subfolderThe Scripts subfolder contains the following utility functions:The Scripts folder al

Página 308

370EXTENDING DREAMWEAVER CS4The Shared folderThe CMN folderThe CMN folder contains the following utility functions:File DescriptionclassCheckbox.js He

Página 309 - Chapter 19: Server formats

371EXTENDING DREAMWEAVER CS4The Shared folderOther foldersThe following list describes other folders of interest in the Shared folder:Controls The C

Página 310 - Server formats

372EXTENDING DREAMWEAVER CS4The Shared folderUsing the Shared folder Look first in the Dreamweaver Configuration/Shared/Common folder for useful exten

Página 311

373IndexAaction files 234action tag 147activate tag 147addDynamicSource() 298alert() 96analyzeServerBehavior() 251APIs, types ofbehaviors 239C-

Página 312

32EXTENDING DREAMWEAVER CS4Customizing Code viewThe <method> tag and its attributes are similar to the function tag and its attributes, but the

Página 313

374EXTENDING DREAMWEAVER CS4IndexcanInsertObject() 120canRecognizeDocument() 322category tag 106changing default file type 5charEnd tag, code color

Página 314

375EXTENDING DREAMWEAVER CS4IndexComponents panelextending 309files 310tree control 311Components panel API functionsgetCodeViewDropCode() 314getC

Página 315 - Chapter 20: Components

376EXTENDING DREAMWEAVER CS4Indexdynamic menussample code 156user experience 152dynamic templates 18Dynamic Text dialog box 290Eeditmenu items 14

Página 316

377EXTENDING DREAMWEAVER CS4Indexperformance issues 232user experience 222focus() 96folders and files server behavior 247form object 96formatDynam

Página 317 - Properties of tree control

378EXTENDING DREAMWEAVER CS4IndexJS_BooleanToValue() 354JS_DefineFunction() 350JS_DoubleToValue() 354JS_ExecuteScript() 357JS_GetArrayLength() 356

Página 318

379EXTENDING DREAMWEAVER CS4Indexof tag objects 101of text objects 102number object 96numbers tag, code coloring 54Oobject object 96objectsadding

Página 319 - Components

380EXTENDING DREAMWEAVER CS4Indexseparator tag 108, 144, 174server behaviordeleting 288dwscripts functions 256example 248extensions, about 76findi

Página 320

381EXTENDING DREAMWEAVER CS4Indexdocking 168dropdown tag 177editcontrol tag 179file definition 170include/ tag 173item tags 175itemref/ tag 173i

Página 321

33EXTENDING DREAMWEAVER CS4Customizing Code view<method pattern="openFirstPanel()" icon= ".../hintMisc.gif" /> ... ...

Página 322

ivEXTENDING DREAMWEAVER CS4ContentsChapter 7: Insert bar objectsHow object files work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 323

34EXTENDING DREAMWEAVER CS4Customizing Code viewSpry attribute grouping formatThe following code shows the format of the .vtm file. This format allows

Página 324

35EXTENDING DREAMWEAVER CS4Customizing Code viewExample <crosstag_attributes> <attribgroup id="spryRegionAttrs" name="Spry1.

Página 325

36EXTENDING DREAMWEAVER CS4Customizing Code viewExample <codehints><menugroup>DescriptionEach menugroup tag corresponds to a type of menu

Página 326 - • When server model changes

37EXTENDING DREAMWEAVER CS4Customizing Code viewContainerThe menugroup tag.Example <description> <![CDATA[ To add or remove tags and attribu

Página 327

38EXTENDING DREAMWEAVER CS4Customizing Code view<menuitem>DescriptionThis tag specifies the text for an item in a code hints pop-up menu. The me

Página 328 - Chapter 21: Server models

39EXTENDING DREAMWEAVER CS4Customizing Code viewFor object methods, when you type the object name, Dreamweaver opens a menu of the methods that are de

Página 329 - Server models

40EXTENDING DREAMWEAVER CS4Customizing Code viewAttributespattern, icon, object, source, constructor, static, retType• The pattern attribute specifies

Página 330

41EXTENDING DREAMWEAVER CS4Customizing Code view• optionArray, which indicates a list of nested <optionparammenu> and <parammenuitem> to d

Página 331

42EXTENDING DREAMWEAVER CS4Customizing Code view• The value attribute specifies the value of the parameter to insert when the user selects the code hi

Página 332

43EXTENDING DREAMWEAVER CS4Customizing Code view• The value attribute is the string that Dreamweaver inserts in the document when you select the comma

Página 333

vEXTENDING DREAMWEAVER CS4ContentsA simple Property inspector example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 334 - • ADODB version 2.1

44EXTENDING DREAMWEAVER CS4Customizing Code viewAbout code coloringDreamweaver lets you customize or extend the code coloring schemes that you see in

Página 335 - Chapter 22: Data translators

45EXTENDING DREAMWEAVER CS4Customizing Code viewThe following excerpt from the CodeColoring.xml file illustrates the hierarchy of tags in a code color

Página 336 - Data translators

46EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesname, id, priority, {doctypes}• name="scheme_name" A string that assigns a name to

Página 337

47EXTENDING DREAMWEAVER CS4Customizing Code view<blockStart>DescriptionOptional. Specified only if the coloring scheme can be embedded inside a

Página 338

48EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesNone.Example <charStart><![CDATA[']]></charStart><charEnd>Descr

Página 339

49EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesNone.Example <commentEnd><![CDATA[--%>]]></commentEnd><cssImport/>

Página 340

50EXTENDING DREAMWEAVER CS4Customizing Code viewExample <cssProperty name="Property" id="CodeColor_CSSProperty" /><cssSel

Página 341

51EXTENDING DREAMWEAVER CS4Customizing Code viewAttributesname, id• name="display_name" A string that Dreamweaver displays in the code colo

Página 342 - Create the icon

52EXTENDING DREAMWEAVER CS4Customizing Code viewExample <entity name="Special Characters" id="CodeColor_HTMLEntity" /><fu

Página 343

53EXTENDING DREAMWEAVER CS4Customizing Code view<ignoreCase>DescriptionSpecifies whether case should be ignored when comparing tokens to keyword

Página 344

viEXTENDING DREAMWEAVER CS4ContentsAdding a translated attribute to a tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 345 - 2 Enter the following code:

54EXTENDING DREAMWEAVER CS4Customizing Code view<keyword>DescriptionA string of text that defines a keyword. Multiple keyword tags are allowed.

Página 346

55EXTENDING DREAMWEAVER CS4Customizing Code view<operators>DescriptionA list of characters to be recognized as operators.Attributesname, id• nam

Página 347

56EXTENDING DREAMWEAVER CS4Customizing Code viewExample <sampleText doctypes="JavaScript"><![CDATA[/* JavaScript */ function displ

Página 348

57EXTENDING DREAMWEAVER CS4Customizing Code view<stringEnd>DescriptionContains a text string that represents the delimiter of the end of a code

Página 349

58EXTENDING DREAMWEAVER CS4Customizing Code viewinnerTextThis value tells Dreamweaver to color the block delimiters the same as the default text of th

Página 350

59EXTENDING DREAMWEAVER CS4Customizing Code viewExample <blockStart doctypes="PHP_MySQL" scheme="outerTag"> <![CDATA[<

Página 351 - • The dom argument

60EXTENDING DREAMWEAVER CS4Customizing Code viewTo make the process of defining schemes more flexible, Dreamweaver lets you specify wildcard and escap

Página 352

61EXTENDING DREAMWEAVER CS4Customizing Code viewEscape charactersThe following is a list of escape characters that Dreamweaver supports, along with th

Página 353

62EXTENDING DREAMWEAVER CS4Customizing Code view <!-- #BeginEditable "\*" -->This leaves an editable region name that can be as many a

Página 354 - • A pointer to the function

63EXTENDING DREAMWEAVER CS4Customizing Code viewEditing schemesYou can edit the styles for a code coloring scheme either by editing the code coloring

Página 355 - The C-level API

1Chapter 1: IntroductionThe Extending Dreamweaver CS4 guide describes the Adobe® Dreamweaver® CS4 framework and application programming interface (API

Página 356 - JSBool JS_DefineFunction()

64EXTENDING DREAMWEAVER CS4Customizing Code viewTo edit styles for a scheme using the Code Coloring category in the Preferences dialog box, double-cli

Página 357 - JSBool JS_ValueToDouble()

65EXTENDING DREAMWEAVER CS4Customizing Code viewCSS code coloring <scheme name="CSS" id="CSS" doctypes="CSS" priorit

Página 358 - JS_ValueToUCString()

66EXTENDING DREAMWEAVER CS4Customizing Code view <scheme name="JavaScript" id="JavaScript" doctypes="JavaScript" prio

Página 359 - JSBool JS_UCStringToValue()

67EXTENDING DREAMWEAVER CS4Customizing Code view</keywords> <keywords id="CodeColor_JavascriptNumber"> <keyword>Infinity

Página 360 - JSVal JS_IntegerToValue()

68EXTENDING DREAMWEAVER CS4Customizing Code viewDreamweaver stores browser profiles in the Browser Profile folder inside the Dreamweaver Configuration

Página 361 - JSObject *JS_NewArrayObject()

69EXTENDING DREAMWEAVER CS4Customizing Code view <property names="foo,bar"> <value type="named" name="top"/>

Página 362 - JSBool JS_SetElement()

70EXTENDING DREAMWEAVER CS4Customizing Code view• message="message_string" The message attribute defines a message string that Dreamweaver d

Página 363 - JSBool JS_ReportError()

71EXTENDING DREAMWEAVER CS4Customizing Code viewAbout related filesThe related files feature provides users access to the supporting and related files

Página 364 - C-level extensibility

72EXTENDING DREAMWEAVER CS4Customizing Code viewThe following related files are supported:Related files APIsYou can customize the related files menu t

Página 365

73EXTENDING DREAMWEAVER CS4Customizing Code viewAbout Live viewThe Live view feature facilitates previewing your web pages as it would appear in a bro

Página 366 - JSBool MM_ConfigFileExists()

2EXTENDING DREAMWEAVER CS4IntroductionSome extensions need Dreamweaver to restart before you can use them. If you are running Dreamweaver when you ins

Página 367

74EXTENDING DREAMWEAVER CS4Customizing Code view{ var browser = document.getElementById("browser"); browser.addEventListener("Browser

Página 368

75Chapter 4: Extending DreamweaverDreamweaver provides an extensive set of tools that you can use to add to or customize its functionality.When you cr

Página 369

76EXTENDING DREAMWEAVER CS4Extending DreamweaverFloating panel extensions add floating panels to the Dreamweaver user interface. Floating panels can

Página 370 - JSBool MM_DeleteConfigFile()

77EXTENDING DREAMWEAVER CS4Extending DreamweaverConfiguration folders and extensionsThe folders and files that are stored in the Dreamweaver Configura

Página 371

78EXTENDING DREAMWEAVER CS4Extending DreamweaverMultiuser Configuration foldersFor the multiuser operating systems of Windows XP, Windows 2000, and Ma

Página 372

79EXTENDING DREAMWEAVER CS4Extending DreamweaverExtension APIsThe extension APIs provide you with the functions that Dreamweaver calls to implement ea

Página 373 - Chapter 24: The Shared folder

80EXTENDING DREAMWEAVER CS4Extending DreamweaverPlug-ins (set to play at all times) are supported in the BODY of extensions. The document.write() stat

Página 374 - The MM folder

81EXTENDING DREAMWEAVER CS4Extending Dreamweaver <strings> <!-- errors for feature X --> <string id="featureX/subProblemY"

Página 375 - The Class folder

82Chapter 5: User interfaces for extensionsMost extensions are built to receive information from the user through a user interface (UI). For example,

Página 376 - The CMN folder

83EXTENDING DREAMWEAVER CS4User interfaces for extensions• Applying changes to the user documentDreamweaver HTML rendering controlIn earlier versions

Página 377 - Other folders

3EXTENDING DREAMWEAVER CS4IntroductionDocumentation Resource CenterImprove your Dreamweaver skills with books from Adobe. Check out the latest content

Página 378 - Using the Shared folder

84EXTENDING DREAMWEAVER CS4User interfaces for extensionsThe following example shows the settings for an editable select list: <select name="

Página 379

85EXTENDING DREAMWEAVER CS4User interfaces for extensions} </script> </head> <body> <div name="test"> <for

Página 380

86EXTENDING DREAMWEAVER CS4User interfaces for extensionsThe following figure shows an advanced Recordset dialog box that uses a database tree control

Página 381

87EXTENDING DREAMWEAVER CS4User interfaces for extensionsYou can change the connection attribute to retrieve selected data and display it in the tree.

Página 382

88EXTENDING DREAMWEAVER CS4User interfaces for extensionsTree controls display data in a hierarchical format and let users expand and collapse nodes i

Página 383

89EXTENDING DREAMWEAVER CS4User interfaces for extensionsFor readability, TREECOLUMN tags should follow immediately after the MM:TREECONTROL tag, as s

Página 384

90EXTENDING DREAMWEAVER CS4User interfaces for extensionsManipulating content within a tree controlTree controls and the nodes within them are impleme

Página 385

91EXTENDING DREAMWEAVER CS4User interfaces for extensionsIn this example, the user changes the value of the text box and then tabs or clicks elsewhere

Página 386

92EXTENDING DREAMWEAVER CS4User interfaces for extensions<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>

Página 387

93EXTENDING DREAMWEAVER CS4User interfaces for extensionsThis example shows a simple implementation of the SWF file support of Dreamweaver. After you

Comentários a estes Manuais

Sem comentários