Adobe Extending Dreamweaver CS4 User Manual
Page 141
![background image](/files/771331/content/doc141.png)
135
EXTENDING DREAMWEAVER CS4
Commands
Otherwise,
canAcceptCommand()
returns the value
false
and Dreamweaver dims the item, as shown in the following
figure:
Link functions to the OK and Cancel buttons
When the user clicks OK or Cancel, the extension needs to perform the appropriate action. You determine the
appropriate action by specifying which JavaScript function to perform when either button is clicked.
1
Open the file Change Case.js in the Configuration/Commands folder.
2
At the end of the file, add the following code:
function commandButtons() {
return new Array("OK", "changeCase()", "Cancel", "window.close()");
}
3
Save the file.
The
commandButtons()
function causes Dreamweaver to supply the OK and Cancel buttons and tells Dreamweaver
what to do when the user clicks them. The
commandButtons()
function tells Dreamweaver to call
changeCase()
when the user clicks OK and to call
window.close()
when the user clicks Cancel.
Let the user specify uppercase or lowercase
When the user clicks a menu item, the extension needs a mechanism to let the user select uppercase or lowercase. The
UI provides this mechanism by defining two radio buttons to let the user make that choice.
1
Open the file Change Case.js.
2
At the end of the file, add the following code:
- Acrobat 9 PRO
- Acrobat 9 PRO
- Acrobat 9 PRO
- Acrobat 9 PRO
- Acrobat 9 PRO Extended
- Acrobat 9 PRO Extended
- Acrobat 9 PRO Extended
- Acrobat 8 3D
- Acrobat 8 3D
- Acrobat 8 3D
- Acrobat 7 Professional
- Acrobat 7 Professional
- After Effects CS4
- After Effects CS4
- After Effects CS4
- After Effects CS4
- Media Encoder CS5.5
- Media Encoder CS5.5
- Media Encoder CS5.5
- Media Encoder CS5.5
- Media Encoder CS4
- Digital Publishing Suite
- InDesign CC v.9.2 2014
- InDesign CC v.9.2 2014
- After Effects CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InCopy CS3
- InDesign Filters Readme
- InDesign Tagged Text
- InDesign
- InDesign
- InDesign CS4
- Dreamweaver CS3
- Dreamweaver CS4
- Dreamweaver CS3
- Dreamweaver CS3
- Dreamweaver CS3
- Extending Dreamweaver CS3
- Extending Dreamweaver CS3
- Dreamweaver CS4
- Dreamweaver API Reference CS3
- Dreamweaver API Reference CS3
- Dreamweaver API Reference CS3
- Flash Professional CS3
- Flash Professional CS3
- Flash Professional CS3
- Flash Professional CS3
- Flash Professional CS3
- Flash Professional CS3
- Flash Professional CS3
- Extending Flash Professional CS5.5
- Extending Flash Professional CS4
- Premiere Pro CS6
- Premiere Pro CS6
- Premiere Pro CS6
- Premiere Pro CS6
- Premiere Pro CS4
- Premiere Pro CS3
- Photoshop CC 2014 v.14.xx
- Photoshop CC 2014 v.14.xx
- Photoshop CC 2014 v.14.xx
- Photoshop CC 2014 v.14.xx
- Photoshop Lightroom 2
- Photoshop Lightroom 2
- Photoshop Lightroom 2
- Photoshop Lightroom 2
- Photoshop Lightroom 2
- Photoshop CS4
- Photoshop CS3
- Elements Organizer 8 for Windows
- Elements Organizer 8 for Windows
- Elements Organizer 11
- Elements Organizer 11
- Premiere Elements 12
- Premiere Elements 12
- Premiere Elements 8
- Premiere Elements 7
- Premiere Elements 8
- Premiere Elements 7
- Illustrator CS6
- Illustrator CS6
- Illustrator CS6
- Illustrator CS6
- Illustrator CS6
- Illustrator CS6
- Illustrator CS3