Adobe Extending Dreamweaver CS4 Instrukcja Użytkownika Strona 1

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Oprogramowanie Adobe Extending Dreamweaver CS4. Adobe Extending Dreamweaver CS4 User Manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 387
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów

Podsumowanie treści

Strona 1 - DREAMWEAVER

Extending ADOBE® DREAMWEAVER® CS4

Strona 2 - Copyright

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

Strona 3 - Contents

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

Strona 4

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

Strona 5

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

Strona 6

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

Strona 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

Strona 8 - Creating an extension

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

Strona 9 - Introduction

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

Strona 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

Strona 11

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

Strona 12 - • String-delimited tags

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

Strona 13 - <tagspec>

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

Strona 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

Strona 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

Strona 16

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

Strona 17 - <deleteditems>

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

Strona 18 - Changing FTP mappings

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

Strona 19 - 5 Save the file

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

Strona 20

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

Strona 21

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

Strona 22

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

Strona 23

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

Strona 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,

Strona 25 - See also

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

Strona 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

Strona 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

Strona 28 - <document>

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

Strona 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

Strona 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

Strona 31

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

Strona 32

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

Strona 33

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

Strona 34

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

Strona 35

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

Strona 36 - About code hints

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

Strona 37 - JavaScript code hinting

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

Strona 38 - Customizing Code view

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

Strona 39

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

Strona 40

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

Strona 41 - Code hints tags

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

Strona 42 - <description>

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

Strona 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

Strona 44 - <function>

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

Strona 45 - <method>

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

Strona 46 - <parammenu>

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

Strona 47 - <optionparammenu>

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

Strona 48 - <property>

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

Strona 49 - <event>

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

Strona 50 - About code coloring

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

Strona 51 - <scheme>

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

Strona 52 - <blockEnd>

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

Strona 53 - <charStart>

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

Strona 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

Strona 55 - <cssProperty/>

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

Strona 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

Strona 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

Strona 58 - <idCharRest>

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

Strona 59 - <isLocked>

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

Strona 60 - <numbers/>

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

Strona 61 - <sampleText>

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

Strona 62 - <stringStart>

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

Strona 63 - <tagGroup>

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

Strona 64

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

Strona 65 - Scheme processing

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

Strona 66 - Wildcard characters

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

Strona 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

Strona 68 - Scheme precedence

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

Strona 69 - Editing schemes

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

Strona 70 - Code coloring examples

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

Strona 71

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

Strona 72

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

Strona 73 - About Code validation

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

Strona 74 - <css-support>

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

Strona 75 - <value>

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

Strona 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

Strona 77 - About related files

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

Strona 78

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

Strona 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

Strona 80

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

Strona 81

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

Strona 82

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

Strona 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

Strona 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

Strona 85 - Extension APIs

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

Strona 86 - Localizing an extension

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

Strona 87 - Extending Dreamweaver

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

Strona 88

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

Strona 89 - Editable select lists

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

Strona 90

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

Strona 91 - Database controls

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

Strona 92

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

Strona 93 - Tree controls

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

Strona 94 - Creating a tree control

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

Strona 95

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

Strona 96

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

Strona 97

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

Strona 98

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

Strona 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

Strona 100

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

Strona 101 - Object Model

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

Strona 102 - The Dreamweaver DOM

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

Strona 103 - EXTENDING DREAMWEAVER CS4

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

Strona 104

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

Strona 105

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

Strona 106

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

Strona 107

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

Strona 108

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

Strona 109 - The site object

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

Strona 110 - Chapter 7: Insert bar objects

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

Strona 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

Strona 112 - <insertbar>

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

Strona 113 - <checkbutton />

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

Strona 114 - <separator />

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

Strona 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.

Strona 116

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

Strona 117 - Modifying the Insert bar

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

Strona 118

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

Strona 119 - Create the HTML file

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

Strona 120

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

Strona 121

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

Strona 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

Strona 123

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

Strona 124 - 2 Add the following code:

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

Strona 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

Strona 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

Strona 127

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

Strona 128

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

Strona 129

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

Strona 130

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

Strona 131 - An Issues example

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

Strona 132

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

Strona 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

Strona 134

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

Strona 135

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

Strona 136

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

Strona 137 - Chapter 9: Commands

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

Strona 138 - A simple command example

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

Strona 139 - Writing the JavaScript code

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

Strona 140 - 1 Create a new blank file

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

Strona 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

Strona 142 - Commands

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

Strona 143 - The commands API functions

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

Strona 144

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

Strona 145

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

Strona 146

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

Strona 147 - The menus.xml file

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

Strona 148 - <menu>

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

Strona 149 - <menuitem>

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

Strona 150 - <separator>

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

Strona 151 - <shortcut>

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

Strona 152 - <tool>

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

Strona 153 - <activate>

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

Strona 154 - <override>

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

Strona 155 - Change keyboard shortcuts

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

Strona 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

Strona 157 - Menu commands

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

Strona 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

Strona 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

Strona 160

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

Strona 161

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

Strona 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

Strona 163

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

Strona 164

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

Strona 165

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

Strona 166

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

Strona 167

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

Strona 168

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

Strona 169

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

Strona 170

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

Strona 171

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

Strona 172

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

Strona 173 - Chapter 11: Toolbars

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

Strona 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

Strona 175 - A simple toolbar command file

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

Strona 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

Strona 177 - <toolbar>

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

Strona 178 - Toolbars

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

Strona 179 - <itemref/>

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

Strona 180 - <separator/>

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

Strona 181 - Toolbar item tags

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

Strona 182 - <radiobutton>

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

Strona 183 - <dropdown>

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

Strona 184 - <combobox>

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

Strona 185 - <colorpicker>

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

Strona 186 - Item tag attributes

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

Strona 187

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

Strona 188

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

Strona 189

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

Strona 190 - • Clicks a button

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

Strona 191

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

Strona 192

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

Strona 193

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

Strona 194

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

Strona 195

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

Strona 196

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

Strona 197

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

Strona 198

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

Strona 199 - Chapter 12: Reports

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

Strona 200 - A simple site report example

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

Strona 201 - Stand-alone reports

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

Strona 202 - How stand-alone reports work

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

Strona 203 - Write the JavaScript code

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

Strona 204 - The reports API functions

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

Strona 205

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

Strona 206

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

Strona 207

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

Strona 208

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

Strona 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

Strona 210

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

Strona 211

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

Strona 212 - The Tag Chooser

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

Strona 213

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

Strona 214

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

Strona 215 - Create a tag editor UI

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

Strona 216 - Tag libraries and editors

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

Strona 217 - Add a tag to Tag Chooser

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

Strona 218 - The tag editor API functions

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

Strona 219

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

Strona 220 - Property inspector files

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

Strona 221 - Property inspectors

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

Strona 222 - Create the user interface

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

Strona 223

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

Strona 224

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

Strona 225 - Test the Property inspector

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

Strona 226

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

Strona 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

Strona 228 - Chapter 15: Floating panels

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

Strona 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

Strona 230

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

Strona 231 - Floating panels

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

Strona 232

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

Strona 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.

Strona 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

Strona 235

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

Strona 236

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

Strona 237

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

Strona 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

Strona 239

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

Strona 240 - Chapter 16: Behaviors

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

Strona 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

Strona 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

Strona 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

Strona 244

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

Strona 245 - The behaviors API functions

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

Strona 246

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

Strona 247

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

Strona 248

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

Strona 249

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

Strona 250

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

Strona 251

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

Strona 252 - Chapter 17: Server behaviors

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

Strona 253 - Dreamweaver architecture

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

Strona 254 - The script file

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

Strona 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

Strona 256 - Server behaviors

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

Strona 257 - The server behavior API

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

Strona 258

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

Strona 259

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

Strona 260

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

Strona 261

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

Strona 262

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

Strona 263

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

Strona 264 - EDML files

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

Strona 265 - Group EDML file tags

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

Strona 266 - <group> attributes

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

Strona 267

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

Strona 268 - <groupParticipants>

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

Strona 269 - <groupParticipant>

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

Strona 270

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

Strona 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

Strona 272 - <insertText>

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

Strona 273 - <insertText> attributes

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

Strona 274

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

Strona 275 - <searchPatterns>

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

Strona 276 - <searchPattern>

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

Strona 277

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

Strona 278

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

Strona 279

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

Strona 280 - <updatePattern>

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

Strona 281

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

Strona 282 - <delete> attributes

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

Strona 283 - <translator>

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

Strona 284 - <translation>

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

Strona 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

Strona 286 - <openTag>

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

Strona 287 - <attribute>

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

Strona 288 - <closeTag>

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

Strona 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

Strona 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

Strona 291

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

Strona 292 - Search pattern resolution

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

Strona 293 - Updating server behaviors

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

Strona 294 - Deleting server behaviors

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

Strona 295

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

Strona 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

Strona 297 - Data sources

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

Strona 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

Strona 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

Strona 300

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

Strona 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

Strona 302

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

Strona 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

Strona 304

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

Strona 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

Strona 306

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

Strona 307

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

Strona 308

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

Strona 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

Strona 310 - Server formats

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

Strona 311

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

Strona 312

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

Strona 313

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

Strona 314

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

Strona 315 - Chapter 20: Components

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

Strona 316

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

Strona 317 - Properties of tree control

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

Strona 318

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

Strona 319 - Components

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

Strona 320

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

Strona 321

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

Strona 322

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

Strona 323

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

Strona 324

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

Strona 325

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

Strona 326 - • When server model changes

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

Strona 327

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

Strona 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

Strona 329 - Server models

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

Strona 330

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

Strona 331

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

Strona 332

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

Strona 333

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

Strona 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

Strona 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

Strona 336 - Data translators

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

Strona 337

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

Strona 338

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

Strona 339

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

Strona 340

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

Strona 341

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

Strona 342 - Create the icon

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

Strona 343

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

Strona 344

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

Strona 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.

Strona 346

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

Strona 347

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

Strona 348

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

Strona 349

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

Strona 350

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

Strona 351 - • The dom argument

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

Strona 352

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

Strona 353

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

Strona 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

Strona 355 - The C-level API

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

Strona 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

Strona 357 - JSBool JS_ValueToDouble()

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

Strona 358 - JS_ValueToUCString()

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

Strona 359 - JSBool JS_UCStringToValue()

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

Strona 360 - JSVal JS_IntegerToValue()

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

Strona 361 - JSObject *JS_NewArrayObject()

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

Strona 362 - JSBool JS_SetElement()

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

Strona 363 - JSBool JS_ReportError()

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

Strona 364 - C-level extensibility

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

Strona 365

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

Strona 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

Strona 367

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

Strona 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

Strona 369

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

Strona 370 - JSBool MM_DeleteConfigFile()

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

Strona 371

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

Strona 372

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

Strona 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

Strona 374 - The MM folder

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

Strona 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,

Strona 376 - The CMN folder

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

Strona 377 - Other folders

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

Strona 378 - Using the Shared folder

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

Strona 379

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

Strona 380

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

Strona 381

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

Strona 382

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

Strona 383

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

Strona 384

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

Strona 385

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

Strona 386

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

Strona 387

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

Komentarze do niniejszej Instrukcji

Brak uwag