MACROMEDIA COLDFUSION STUDIO 5 Use Manual

CFS_MANCVRPG_live.fh9 10/1/01 12:37 PM Page 1
C M Y CM MY CY CMY K
macromedia
®
COLDFUSION®5 STUDIO
Using ColdFusion 5 Studio
Composite
macromedia
®
®
Copyright Notice
Copyright 2001 Macromedia, Inc. All rights reserved. Macromedia, the Macromedia logo, ColdFusion, Dreamweaver, Dreamweaver
UltraDev, Flash, HomeSite, JRun, Quick Tag Editor, Roundtrip, and what the web can be are trademarks or registered trademarks of Macromedia, Inc. which may be registered in the United States and internationally. Java and Solaris are trademarks of Sun Microsystems, Inc. Microsoft, Windows, Windows NT, Windows 98, Windows ME, Windows XP, and Windows 2000 are registered trademarks of Microsoft Corporation. UNIX is a trademark of The Open Group. Other brand names may be trademarks or registered trademarks of others.
This manual, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. The content of this manual is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Macromedia Inc. Macromedia Inc. assumes no responsibility or liability for any errors or inaccuracies that may appear in this book.
Except as permitted by such license, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Macromedia Inc.
Part number: ZCS50M100
Contents
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Developer Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
About the Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Getting Answers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Contacting Macromedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Chapter 1 Setting Up the Product . . . . . . . . . . . . . . . . . 1
System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Installing or Upgrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Completing Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Monitoring System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Macromedia Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
ColdFusion Web resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Documentation conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Printed and online documentation set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Viewing online documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Printing online documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
About the Initial Configuration Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Setting up for the first time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Setting up from a previous version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Releasing system resources taken at start-up . . . . . . . . . . . . . . . . . . . . . . . . . . 6
About the Resource Level Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Using the Resource Level Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 2 Configuring Browsers and Servers . . . . . . . 9
Configuring the Internal Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Setting the internal browser options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Configuring External Browsers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Working with Files on Remote Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Using the SNE node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
iv Contents
Connecting to servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Enabling Secure FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Managing servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Adding server mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Understanding RDS Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 3 Exploring the Workspace . . . . . . . . . . . . . . 25
The Workspace Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Setting workspace options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Working in the Resources Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
About the Resource tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Creating and Browsing Files in the Document Window . . . . . . . . . . . . . . . . . . . . . 29
Edit tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Browse tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Help tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Tracking Your Work in the Results Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Customizing the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Managing application toolbars and the QuickBar . . . . . . . . . . . . . . . . . . . . 31
Customizing toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Getting the Most from the Help System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Opening Help in tag editors and Tag Chooser . . . . . . . . . . . . . . . . . . . . . . . . 35
Editing Help in tag editors and Tag Chooser . . . . . . . . . . . . . . . . . . . . . . . . . 35
Accessing Help References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Printing Help topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Bookmarking Help topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Searching Help References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Making and viewing comments in the Help system . . . . . . . . . . . . . . . . . . . 38
Extending the Help system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Adding media content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Chapter 4 Managing Files . . . . . . . . . . . . . . . . . . . . . . . 43
About the Files Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
About File Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Working with Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Setting startup options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Opening files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Copying, moving, renaming, or deleting a file . . . . . . . . . . . . . . . . . . . . . . . . 47
Adding a link to an open file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Saving files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Backing up files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Changing the file list display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Dragging files from Windows Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Building a favorite folders list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Downloading Web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Contents v
Chapter 5 Writing Code and Web Content . . . . . . . . . 53
Inserting Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Inserting tags from the QuickBar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Selecting tags from the Tag Chooser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Completing tags with Tag Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Using Inline Tools to Enter Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Tag Insight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Function Insight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Tag Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Auto Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Code Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Extended and special characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Using Code Generating Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Adding Document Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Using Keyboard Shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Saving Code Blocks as Snippets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Sharing snippets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Adding snippet shortcut keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Making Web Sites Accessible to Visually Impaired Visitors . . . . . . . . . . . . . . . . . . 66
Tips for Visually Impaired Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Assigning keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Working with user interface elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Chapter 6 Editing Pages . . . . . . . . . . . . . . . . . . . . . . . . 69
Setting Editor Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using the editor toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using the Settings dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Selecting Code and Text Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Saving Text to the Multiple-Entry Clipboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Setting the clip entry limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Collapsing Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Setting options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Editing Referenced Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Editing image files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Editing included files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using Tag Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
About VTML Tag Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Editing a tag with a Tag Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Navigating a document structure in the Tag Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 77
About outline profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Configuring the Tag Tree display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
vi Contents
Editing code in the Tag Inspector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Setting the display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Creating and editing event handler script blocks . . . . . . . . . . . . . . . . . . . . . 80
Formatting Pages with Cascading Style Sheets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
About the Style Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Chapter 7 Using Web Development Languages . . . . . 83
About Language Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
What languages are supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
How a language is detected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Setting Options for Markup Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Coding in XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
What is XHTML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Setting options for XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Enabling XHTML support in a document . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Using Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
About regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Special characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Single-character regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Character classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Multicharacter regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Using back references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Anchoring a regular expression to a string . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Expression examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Using Color Coding Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Setting the supported file types for a scheme . . . . . . . . . . . . . . . . . . . . . . . . . 95
Setting the tag display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Preserving Code Formats with CodeSweepers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Selecting a CodeSweeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Running a CodeSweeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Managing CodeSweepers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Setting Macromedia CodeSweeper options . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Setting HTML Tidy options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Validating Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Using the default validator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Using the CSE HTML Validator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Working with Tag Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
About namespace precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Setting namespace precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Editing tag definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Contents vii
Chapter 8 Accessing Data Sources . . . . . . . . . . . . . . 109
Introduction to Database Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Working with Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Configuring data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Connecting to data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Viewing data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Using SQL Builder for Database Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
The SQL Builder user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Writing SQL statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Building a SELECT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Inserting SQL into a page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Testing and editing queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Chapter 9 Debugging Application Code . . . . . . . . . . 117
Overview of the Interactive Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Setting up a Debugging Session. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Using the Interactive Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
About the Debugger toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Running the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Debug windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Debugging across multiple pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Stepping through code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Evaluating an expressions and setting a watch . . . . . . . . . . . . . . . . . . . . . . 123
Chapter 10 Managing a Web Site with Projects . . . . 125
Understanding Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
What is a project? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Why use projects? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
About project folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
About the project file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Creating the initial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Adding folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Adding files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Working with a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Performing basic operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Working with resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Perform other project-level tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Managing a Project with a Source Control System . . . . . . . . . . . . . . . . . . . . . . . . 135
Why use source control? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Supported source control systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Setting up a project in source control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Using source control in ColdFusion Studio . . . . . . . . . . . . . . . . . . . . . . . . . 137
viii Contents
Displaying the Source Control toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Sharing project files in Visual SourceSafe . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Administering multiuser projects in VSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Chapter 11 Deploying Files . . . . . . . . . . . . . . . . . . . . . 139
Setting Default Deployment Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Deploying Singles Files and Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Performing Custom Deployments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Selecting folders and files to deploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Adding Deployment Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Running the Deployment Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Chapter 12 Testing and Maintaining
Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Working in the Results Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Opening the Results window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Saving results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Searching Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Selecting search text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Saving search text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Using basic search commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Using extended search commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Searching with regular expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Checking Spelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Configuring the spell checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Using the spell checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Verifying Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Using Site View to Check Page Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Testing Page Download Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Chapter 13 Customizing the Development
Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
The Visual Tools Markup Language (VTML) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Customizing the Tag Chooser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Exploring the new VTML structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Dialog Definition Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Category tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Element tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Creating Tag Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Tag definition file structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Defining attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Contents ix
Defining attribute categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Building Tag Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Defining controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Populating dialog boxes with tag data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Generating a tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Using TAGDATAUnknownAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Adding Tag Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Providing Help from an external file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Container/Control Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
TabDialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
TabPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
DropDown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
ListBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
FontPicker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
ColorPicker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Checkbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
RadioGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
TextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
SQLTextArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
FileBrowser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
StyleTextBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
ActiveX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Building Custom Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Saving wizard files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Creating Wizard Definition Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Dynamic expressions in tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Bound controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Wizard definition page example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Creating Wizard Output Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Expressions and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
WIZ Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Special considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Wizard Definition Page Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Chapter 14 Scripting the Visual Tools Object Model 195
Writing and Executing Scripts in Visual Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
The VTOM hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Writing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Executing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Creating a custom toolbutton and toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . 198
x Contents
Application Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Toolbar and toolbutton methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
ActiveDocument Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
DocumentCache Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Project Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
ProjectManager Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Folder methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Deployment methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
DeploymentManager Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Project folder names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
HTTPProvider Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
ZIPProvider Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
ActiveScripting Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
JScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Third-Party Add-Ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Running a script at startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Table of CommandID Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Table of SettingID Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
About This Book
Using ColdFusion Studio is designed to familiarize you with the product’s user interface and productivity tools that you can use to quickly develop high-quality applications and Web content.
Contents
Intended Audience....................................................................................................xii
Developer Resources................................................................................................. xii
About the Documentation....................................................................................... xiv
Getting Answers ......................................................................................................xvii
Contacting Macromedia......................................................................................... xvii
xii About This Book
Intended Audience
This book is intended for professional Web developers who have a working knowledge of HTML and Web server environments. It introduces you to the ColdFusion Studio user interface and development tools, and provides instructions for installing, configuring, and using the product.
Developer Resources
Macromedia Corporation is committed to setting the standard for customer support in developer education, technical support, and professional services. Therefore, the Macromedia Web site provides a wealth of online resources.
This section also describes other resources available for ColdFusion Studio developers.
Macromedia Web site
The Macromedia Web site is designed to give you quick access to the entire range of online resources, as the following table describes.
Resource Description URL
Macromedia Web site General information about Macromedia
products and services
Product Information Detailed product information on Macromedia
products and related topics
Technical Support Professional support programs offered by
Macromedia
Knowledge Base Repository of articles for improving the
performance of Macromedia products and
extending their functionality
Installation Support Support for installation-related issues for all
Macromedia products
Visual Tools Support Forums
Developer Center All the resources that you need to stay
Online access to experienced developers
and Macromedia support staff, where you
can post messages and read replies on
subjects relating to Visual Tools features
current in your skills, including online
discussion groups, Knowledge Base,
technical papers and more
www.macromedia.com
http://www.macromedia.com/ software/
http://www.macromedia.com/ support/
http://www.macromedia.com/go/ allaire_kb
http://www.macromedia.com/go/ allaire_installation
http://www.macromedia.com/go/ fp_cfstudio_cfforum
http://www.macromedia.com/go/ fp_cfstudio_cfrefdesk
Developer Resources xiii
Resource Description URL
Developer Exchange Open repository where you can view,
contribute, and download multiple types of
content that benefit software developers, for
example custom tags, scripts, Web content,
visual tools, and third-party applications
Browser testing sites Browser compatibility is still an important
issue for Web site developers and these
sites provide online testing services.
Professional Education Information about developer certification
and the classes, on-site training, and online
courses offered by Macromedia
Documentation Links to download the latest documentation
and documentation updates.
Macromedia Alliances Connection with the growing network of
solution providers, application developers,
resellers, and hosting services which create
solutions with Macromedia products
http://www.macromedia.com/go/ fp_cfstudio_exchange
http://builder.cnet.com/ webbuilding/ 0-7255-8-5801921-1.html
http://www.macromedia.com/ support/training/
http://www.macromedia.com/go/ allaire_docs
http://www.macromedia.com/ partners/
ColdFusion Web resources
Tutorials
These are just a few of the many sites dedicated to CFML development:
CF Advisor Online at www.cfadvisor.com/api-shl/engine.cfm.
Haznet’s Fallout shelter, a CF portal, at www.hudziak.com/haznet/cfml.html.
ColdFusion Developer’s Journal, an online version of the popular print journal, at
www.sys-con.com/coldfusion/index2.cfm.
The World Wide Web Consortium (W3C) is the source for all things Web-related. Their Web site has free tutorials on Web languages, technologies, and development available at www.W3Schools.com.
Another good Web source for tutorials is http://www.findtutorials.com.
xiv About This Book
About the Documentation
The documentation is designed to provide support for the complete spectrum of participants. The print and online versions are organized to allow you to quickly locate the information that you need. The online documentation is provided in HTML and Adobe Acrobat formats.
You can also access release notes, product support information, and several developer resources from the Help menu.
The rest of this section describes the conventions used in the documentation and the contents of the ColdFusion Studio documentation set.
Documentation conventions
When reading the documentation, note the following formatting cues:
Code samples are set in a monospaced font.
Levels to access a dialog box or pane are separated by the greater than (>) sign,
and the path to access the item is set in bold. Following are two examples:
“Select File > New” means “Select New from the File menu.”
“Select Options > Settings > Editor > Auto Completion” means “Select
Settings from the Options menu and then, in the Settings dialog box, expand
the Editor node and select Auto Completion.”
Book titles and emphasized text are set in italics.
New terms are set in boldface.
Printed and online documentation set
The ColdFusion documentation set consists of the following titles.
Book Description
Using ColdFusion Studio
Installing and Configuring ColdFusion Server
Advanced ColdFusion Server Administration
Developing ColdFusion Applications
Describes how to use ColdFusion Studio to build, test, and deploy Web content, including using the built-in editor for a variety of scripting and markup languages
Describes system installation and basic configuration for Windows NT, Windows 2000, Solaris, Linux, and HP-UX
Describes how to connect your data sources to the ColdFusion Server, configure security for your applications, and how to use ClusterCATS to manage scalability, clustering, and load-balancing for your site
Describes how to develop your dynamic Web applications, including retrieving and updating your data, using structures, and forms
About the Documentation xv
Book Description
CFML Reference Provides descriptions, syntax, usage, and code examples for all
ColdFusion tags, functions, and variables
CFML Quick Reference
A brief guide that shows the syntax of ColdFusion tags, functions, and variables
Viewing online documentation
You can view Help for a specific tag, Help topics in HTML format, or online documentation in Adobe Acrobat (PDF) format.
To view Help for a tag:
Position the cursor in a tag and press F1. Help for the selected tag appears,
including syntax and usage information.
F1 Help is available for all supported languages. To view a list of the supported languages, open the Tag Chooser (Ctrl+E).
To view the online HTML help:
1Select Help > Open Help References Window.
The Help tab of the Resources window appears, displaying a tree of online books that include several language references as well as the documentation.
2 Find the Help topic you need, using the tree, search engine, index, or bookmarks.
For details, see “Getting the Most from the Help System” on page 35.
3 Double-click the topic you need to display it in the Document window.
To view the PDF documentation:
Open the PDF documentation from the product CD-ROM or download it from
the Macromedia Web site, from www.allaire.com/developer/documentation/ coldfusion.cfm.
xvi About This Book
Printing online documentation
You can print one Help topic at a time in the HTML Help, or print as many pages of the Help as you need from the Adobe Acrobat (PDF) format of the Help.
To print a single Help topic in the HTML Help:
1 Display the Help topic you need to print.
For instructions, see “Viewing online documentation” on page xv.
2 Right-click the topic in the Document window and select your browser’s
command to print.
To print several pages from the PDF documentation:
1 Open the PDF documentation from the product CD-ROM or download it from
the Macromedia Web site, from www.allaire.com/developer/documentation/ coldfusion.cfm.
2 Print as many pages of the documentation as you need.
Getting Answers xvii
Getting Answers
One of the best ways to solve particular programming problems is to tap into the vast expertise of the ColdFusion Studio developer communities on the ColdFusion Forum. on the Macromedia Web site.
Other developers on the forum can help you figure out how to do just about anything with ColdFusion Studio. The search facility can also help you search messages from the previous 12 months, allowing you to learn how others have solved a problem that you might be facing. The Forums is a great resource for learning ColdFusion Studio, and it is also a great place to see the ColdFusion Studio developer community in action.
Contacting Macromedia
Corporate headquarters
Technical support
Sales
Macromedia, Inc. 600 Townsend Street San Francisco, CA 94103
Tel: 415.252.2000 Fax: 415.626.0554
Web:macromedia.com
Macromedia offers a range of telephone and Web-based support options. Go to www.macromedia.com/support/ for a complete description of technical support services.
All User Forums are listed on the Macromedia Forums home page at http://www.macromedia.com/support/ forums/. You can post an entry anytime.
Tol l F r ee : 888.939.2545 Tel: 617.219.2100
Fax: 617.219.2101 E-mail: sales@macromedia.com Online store: http://dynamic.macromedia.com/bin/MM/
store/US/home.jsp.
xviii About This Book
Chapter 1
Setting Up the Product
This chapter contains instructions for installing or upgrading ColdFusion Studio and configuring it.
Contents
System Requirements ................................................................................................. 2
Installing or Upgrading...............................................................................................2
Completing Setup ....................................................................................................... 3
Monitoring System Resources.................................................................................... 6
2 Chapter 1 Setting Up the Product
System Requirements
Following are the minimum installation requirements:
Pentium-compatible processor (Pentium II or higher recommended)
Windows
Internet Explorer 4.5 or higher
128 MB available RAM
256-color monitor capable of 800 x 600 screen resolution
200 MB of free hard disk space
Cold Fusion
CD-ROM drive (for installing CD version)
®
98, ME, NT 4, 2000, XP
®
Server5 (for debugging, database access, and deployment)
Installing or Upgrading
This section contains instructions for installing ColdFusion Studio. Do not install an earlier version of ColdFusion Studio over a later version; however,
later versions are backward-compatible with earlier versions. If both this version and a previous version are installed on your machine, you can run either version, but the earlier version will reflect changes made in the current version to searching, source control and projects, debugging, FTP, RDS, and validation.
ColdFusion Studio records any errors that are encountered during installation to a .log file in the root directory. Please be ready to send this file to Technical Support if you need help with installation.
To install:
1 Close all open applications and insert the ColdFusion Studio CD-ROM. 2 When the opening screen displays, click Install. 3 Follow the instructions in the Installation Wizard.
4 Once the program files are copied to your system, select the option to restart your
machine and click Finish to complete the installation.
The installation is completed.
To upgrade:
1Do not uninstall the previous version before installing the current version. 2Do not delete the UserData and AutoBackup folder. This allows you to import
your customizations into the current version and to files created by the backup feature.
3 Close all open applications and insert the ColdFusion Studio CD-ROM. 4 When the opening screen displays, click Install.
Completing Setup 3
5 Follow the instructions in the Installation Wizard. 6 Once the program files are copied to your system, select the option to restart your
machine and click Finish to complete the installation.
The upgrade is completed.
Completing Setup
This section explains how to initially set up ColdFusion Studio if you have installed it for the first time, and how to set up ColdFusion Studio based on the options that were set in a previous version. The Initial Configuration Wizard (ICW) guides you through both of these processes.
The English language version of ColdFusion Studio is installed with support for Chinese (traditional and simplified), Korean, and Japanese characters sets on localized Windows systems. To enter characters from these sets, use the Microsoft input method. This support depends on your system language, and does not work if the Western language option is set. In Windows, you can reset your system language from the Control Panel, in Regional Settings or Regional Options.
Note
If you need to run HomeSite, ColdFusion Studio, or JRun Studio simultaneously, see Knowledge Base article 20923 for help.
About the Initial Configuration Wizard
The Initial Configuration Wizard (ICW) lets you carry over options from a previous version and also set new options.
The first time you run the current version of ColdFusion Studio, the ICW automatically starts, and it checks for a previous version.
If one is found, you can selectively import options from the previous version.
If one is not found, the wizard prompts you to set a few initial options.
When the wizard is finished, ColdFusion Studio starts. You can run the ICW again at any time by selecting File > New from the menu and
then selecting Initial Configuration Wizard from the Custom tab.
Note
You can use the ICW when upgrading the same product, for example HomeSite 4.5.2 to HomeSite 5, but you cannot import settings when upgrading between products, for example from HomeSite 4.5.2 to ColdFusion Studio 5.
4 Chapter 1 Setting Up the Product
Setting up for the first time
This section explains how to complete the Initial Configuration Wizard (ICW) if you installed ColdFusion Studio for the first time, or if you uninstalled and installed it.
To complete the ICW after a first-time installation:
1 The ICW automatically starts when you run ColdFusion Studio for the first time.
2 In the initial welcome dialog box of the wizard, click Next. 3 In the Debug Settings dialog box, add, modify, or delete RDS server
configurations s as needed. Click Next.
4 In the Debug Mappings dialog box, add, modify, or delete a mapping to a RDS
server as needed. Click Next. You can view or modify this information later using the Debug menu commands.
5 In the Development Style dialog box, select the language toolbars to include in
the QuickBar, and select or browse to the template that you want to use as your default for all ColdFusion Studio documents.
6 In the Perform Upgrade dialog box, confirm your selections (you can click Back
and make changes if necessary), and then click Finish.
The initial configuration is complete and you can start using ColdFusion Studio.
Setting up from a previous version
This section explains how to complete the Initial Configuration Wizard (ICW) if you installed this version of ColdFusion Studio over a previous version (not uninstalling before you installed).
To complete the ICW after an upgrade:
1 The ICW automatically starts after you run ColdFusion Studio fro the first time
after upgrading.
2 In the initial welcome dialog box of the wizard, click Next. 3 In the Upgrade Product Settings dialog box, note the items that you can upgrade,
based on the changes made in the previous version. Click Next. What appears next depends on the changes made in the previous version.
If remote servers were defined in the previous version, the Upgrade Remote
Servers dialog box appears.
Select every server that you need for the current version or any previous
version. (If you do not select a server in this list, it will no longer work in the
previous version either.) Click Next.
If toolbars were added or modified, the Upgrade Toolbars dialog box appears.
Select every toolbar change that you want to carry over to the current version
and click Next.
Completing Setup 5
If the previous version contained customizations such as shortcuts, snippets,
code templates, and modifications to Tag Completion and Tag Insight, then
the Upgrade Feature Customizations dialog box appears.
Select every customization that you want to carry over to the current version
and click Next.
4 In the Preserve Editor Settings dialog box, select the options to carry over to the
current version. Click Next. You can change these options later by selecting Options > Settings and making
changes in the Editor pane, Validation pane, and the panes underneath Editor.
5 In the Preserve General Settings dialog box, select the customizations to carry
over to the current version. (Only non-default options appear.) Click Next. You can change these options later by selecting Options > Settings and making
changes in the following panes: General, Markup Languages, Startup, Locations, File Settings, Browse, Spelling, Dreamweaver/UltraDev, Projects, and Tag Definitions Library.
6 In the Miscellaneous Settings dialog box, select the items whose options you
want to carry over to the current version. For example, to carry over color coding customizations, select Color Settings. Or if Auto Completion was enabled in the previous version, and you want to keep it turned on in the current version, select Auto Completion. Click Next.
7 In the Debug Settings dialog box, add, modify, or delete RDS server
configurations s as needed. Click Next.
8 In the Debug Mappings dialog box, add, modify, or delete a mapping to a RDS
servers as needed. Click Next. You can view or modify this information later using the Debug menu commands.
Note
To import a localhost RDS development mapping from a previous version, complete the wizard, open Studio, expand the Macromedia FTP & RDS node on one of the Files tabs, right-click the localhost server and select Delete server. Then run the wizard again and import the previous version of the localhost RDS development mapping.
9 In the Development Style dialog box, select the language toolbars to include in
the QuickBar, and select or browse to the template that you want to use as your default for all ColdFusion Studio documents.
10 In the Perform Upgrade dialog box, confirm your selections (you can click Back
and make changes if necessary), and then click Finish.
The initial configuration is complete and you can start using ColdFusion Studio.
6 Chapter 1 Setting Up the Product
Monitoring System Resources
ColdFusion Studio’s extensive use of GDI and User resources under Windows 98/ME has consistently caused problems for users on these platforms. This section describes the problem and how to mitigate it.
For more information, also see Knowledge Base article 21011 on the Macromedia Web si te.
Releasing system resources taken at start-up
One solution is to free up resources that Windows 98/ME takes at start-up for unnecessary programs and processes.
To release resources that Windows 98/ME takes at start-up:
1 On the Windows Start menu, click Run. 2 Type msconfig in the Run dialog box and click OK.
3 Carefully clear options that you are absolutely certain you do not need, use, or
have. Record your changes as you proceed, in case you need to change back.
4 Click Apply to save your changes. For a useful description of memory usage on Windows 98/ME systems, see the
Windows 9.x System Resources article on InfiniSource. After reclaiming these resources, if you still encounter difficulties with system
resources, you may benefit from configuring the Resource Level Monitor.
About the Resource Level Monitor
Version 4.5.2 introduced the Resource Level Monitor to monitor system resources while the application is running. The Resource Level Monitor warns users when resources reach a critical level, enabling them to save documents and close the application before a crash occurs. However, the warning dialog box was not labeled with the application name, so the source of the warning was not clear, and users had to edit the Windows registry to configure the monitor.
As a result, the Resource Level Monitor has been enhanced for this release so that the warning dialog includes the application name in the window title and in the message text, to clearly indicate that it is generated by Studio, not Windows. Also, users can now configure the monitor in a graphical user interface.
Monitoring System Resources 7
Using the Resource Level Monitor
This section explains how to respond to warnings and how to configure the monitor.
Responding to warnings
The following graphic is an example of the warning dialog box that appears if you have the default warning threshold for GDI resources set at 15% and your available GDI resources drop below this level.
For best results, at least save your work, even if you choose to continue. If you choose to continue, the warning dialog box closes and will not appear again unless your system resources drops another 5%, for example, when GDI resources drop to 9%.
Configuring the monitor
Users should configure the Resource Level Monitor if their system crashes without having been warned, or if they are being warned too frequently or unnecessarily. You can adjust monitor options until you find a stable level for your system.
To configure the Resource Level Monitor:
1Open the Options > Settings > Resource Monitoring pane. 2 Specify the following options, as necessary:
Enable/disable resource monitoring
Specify separate warning level thresholds for GDI and User resources (the
default for each type of resource is 15%)
Set a time interval for monitoring
3 Click Apply to save your changes.
8 Chapter 1 Setting Up the Product
Chapter 2
Configuring Browsers and Servers
This chapter contains instructions for setting up browsers and servers.
Contents
Configuring the Internal Browser ............................................................................ 10
Configuring External Browsers ................................................................................ 11
Working with Files on Remote Servers .................................................................... 13
10 Chapter 2 Configuring Browsers and Servers
Configuring the Internal Browser
The following sections describe the choices available for browsing documents and application pages from within Studio.
Setting the internal browser options
You can use the internal browser to view documents in a Web browser within the program. To set options, select Options > Settings and click Browse.
You can select one of these browser options:
If Microsoft Internet Explorer is installed on your system, you can use it as the
internal browser. Go to http://www.microsoft.com/downloads/ to download the latest version.
If you have Netscape version 6 or later on your system and you correctly install
and configure the Mozilla browser NGLayout/Gecko control, you can use Netscape as the internal browser. Please note the Mozilla control is under development and is limited in its functionality and stability.
For setup instructions, see “To install and configure Mozilla:” on page 10.
A built-in browser is available if you want to use it, but please note that the
built-in browser is limited in its support of HTML and browser extensions.
You can only use one internal browser at a time, but you can change this setting as needed. Restart the program for the change to take effect.
Select the Use External Browser Configuration for Internal Browser option to apply consistent file save behavior when viewing documents in either the internal browser or an external browser. For details, see “Configuring External Browsers” on page 11.
To install and configure Mozilla:
1 Download a Mozilla build from http://ftp.mozilla.org/pub/mozilla/releases/.
For best results, download the Mozilla 0.8.1 build created on 8/28/2001, from http://ftp.mozilla.org/pub/mozilla/releases/mozilla0.8.1/ mozilla-win32-0.8.1.zip.
2 Unzip the Mozilla binary files into a new directory on your system. 3 Open a Command prompt and change to the Mozilla bin directory. For example,
if the bin directory is in D:\mozilla, enter
4Enter
For more information, see Macromedia Knowledge Base article 9927.
regsvr32 mozctlx.dll.
If this does not work, the directory containing regsvr32.exe is not in your PATH variable. Use the Windows Find Files utility to locate the program and then run it using the full path; for example
c:\winnt\system32\regsvr32.exe mozctl.dll.
d: and then enter cd mozilla\bin.
Configuring External Browsers 11
Configuring External Browsers
As part of the installation process, the program compiles a list of the Web browsers it detects on your system. You can view, add, edit, and delete browsers; you can change the default browser; and you can set the browsers’ file saving behavior.
To view the list of browsers:
Select Options > Configure External Browsers.
The External Browsers dialog box appears, listing the browsers it detects and providing options to change the default browser; add, edit, or delete browsers; or set how an active document is handled when opening it in a browser.
To add a browser to the list:
1Select Options > Configure External Browsers to open the External Browsers
dialog box, if it is not already open.
2 Make sure the browser is already installed on your machine, then click Add. 3 Complete the Browser dialog box as follows:
In the Name box, type a name for the new browser.
Click the file button beside the Location box, find the browser program file,
and click Open.
4 Click OK. The new browser appears in the list in the External Browsers dialog box. 5 Click OK to save your changes.
To edit a browser in the list:
1Select Options > Configure External Browsers to open the External Browsers
dialog box, if it is not already open.
2 Click the browser to change and click Edit.
3 Change values in the Browser dialog box as needed:
Type a different name for the browser in the Name box
Specify whether or not the browser uses DDE
Choose a different program file for the browser (for example, for a later
version of the browser)
4 Click OK to close the Browser dialog box.
5 Click OK to save your changes and close the External Browsers dialog box.
12 Chapter 2 Configuring Browsers and Servers
To delete a browser from the list:
1Select Options > Configure External Browsers to open the External Browsers
dialog box, if it is not already open.
2 Click the browser to remove from the list and click Delete. 3 Click Yes in the message that appears to confirm that you want to delete it. 4 Click OK to save your changes and close the External Browsers dialog box.
To change the default browser:
1Select Options > Configure External Browsers to open the External Browsers
dialog box, if it is not already open.
2 Select the appropriate browser and click the up arrow button until it is at the top
of the list. The default browser always appears at the top of the list.
3 Click OK to save your changes and close the External Browsers dialog box.
To set browsers’ file saving behavior:
1Select Options > Configure External Browsers to open the External Browsers
dialog box, if it is not already open.
2 Choose one of the following options for handling a document when opening it in
an external browser:
Prompt to save changes to the current document Asks you whether or
not to save the active document before opening it in the external browser
Automatically save changes to the current document Saves the active
document before opening it in the external browser
Browse using a temporary copy (no need to save) Copies the active
document and opens this copy in the external browser (this option is handy
when making many edits to a page but it requires more system resources)
3 Click OK to save your changes and close the External Browsers dialog box.
Note
If you selected the internal browser option to Use External Browser Configuration for Internal Browser, then the file save behavior you specify here applies to the internal browser too.
To view pages in an external browser, do one of the following:
To view the active document in the default external browser, press F11.
To switch to a different browser, click the View External Browser List button on
the View toolbar, and select a browser from the list.
Tip
To update the page in the browser after making changes to the file you can click the browser’s Refresh/Reload button or press F11 again.
Working with Files on Remote Servers 13
Working with Files on Remote Servers
Working with directories and files on remote servers is virtually identical to working with them on local or network drives. For example, when you save files, changes are saved to the remote server. The primary difference is that you must establish a connection to a remote server before you can work with its files.
You can work on remote servers from the Files tabs and from Windows Explorer via Explorer shell integration. If you do not need server access, you can clear the Options > Settings > File Settings > FTP&RDS >Enable Explorer shell integration.
Using the SNE node
The Macromedia FTP & RDS node, called the Shell Namespace Extension (SNE) node, lets you work with files on configured remote servers in the application and in Windows Explorer. You can add FTP and RDS servers from the SNE node.
If you set the Drive list to My Computer, you can easily access all of your drives and SNE node servers on the File resource tab, as shown in the following graphic.
In previous versions, the SNE node was called “Allaire FTP & RDS.” In this version, the node is called “Macromedia FTP & RDS.” If you install this version on a machine with a previous version of ColdFusion Studio, the previous version no longer recognizes the node. To fix this, you must modify the SNE node.
To use the SNE with earlier versions:
1 After completing the installation, run the SNECompatibility.exe program in the
program directory; for example in C:\Program Files\Macromedia\ColdFusion Studio 5\SNECompatibility.exe.
The Macromedia SNE Compatibility dialog box appears.
14 Chapter 2 Configuring Browsers and Servers
2 Select the appropriate compatibility option:
Allaire HomeSite/Studio 4.5.2 Enables the remote server functionality in
both this version and in previous versions and changes the name of the SNE
node to “Allaire FTP & RDS.”
Macromedia HomeSite/Studio 5.0+ Enables the remote server
functionality only in this version.
3 Click Switch to apply the change, and click Close.
Connecting to servers
ColdFusion Studio provides FTP server access and secure HTTP access via Remote Development Services (RDS). You can perform file transfers and other file management tasks using Macromedia FTP & RDS.
Remote Development Services (RDS) lets you communicate via HTTP with ColdFusion on the local machine and on any configured remote host.
RDS features include:
Secure server access
Data source browsing and SQL query building
Remote file access
CFML debugging
Note
An RDS server connection is required to access data sources and to run the debugger.
Required server information
You must have specific information about a remote server to connect to it, such as
host name and user access requirements. If you do not have this information, you
must get it from the owner of that server, whether it is your IT group, an ISP, or another provider.
Connecting to an FTP server
You can remotely access FTP servers for file transfers and other site management tasks using the Macromedia FTP & RDS feature. Once the connection has been established, you can access files on remote servers and maintain Web sites located anywhere on the Internet.
FTP server connection requirements vary greatly. These instructions work in the majority of cases, but you might have to try variations on the settings.
Working with Files on Remote Servers 15
To connect to an FTP server:
1 Open the drive list at the top of the Files tab and select Macromedia FTP & RDS.
You can also access this feature from Windows Explorer.
2 Right-click Macromedia FTP & RDS and select Add FTP Server to open the
Configure FTP Server dialog box.
3 Enter the following information for the server that you want to connect to:
Field Description Comment
Description Descriptive name to display in
the Files tab and in Windows Explorer.
Host Name Server’s IP address or domain
name, such as
macromedia.com.
Initial Directory Top-level directory for the
account.
Relative from server-assigned directory
Option to specify if the Initial Directory should be set from the server-assigned user directory or from the server root.
Username Login name for the account
used to access the remote server, or “anonymous” for anonymous FTP servers.
Password Password for the account used
to access the remote server.
Root URL The http:// address of the site. This setting allows you to
Remote Port Port used by the FTP server. Use the default 21 unless the
Request Timeout Maximum number of seconds
to wait for a server connection to complete.
Servers with ftp as part of the domain name require you to enter the complete name, for example ftp.somesite.com
This is optional for accounts that default to the root directory of the FTP server, but it is required if the account specifies an initial directory.
Clear this checkbox if the Initial Directory should be set from the server root.
If this field is left blank, you are asked for a username when you log in.
If this field is left blank, you are asked for a password when you log in.
browse files that were opened from the remote server, edited, and saved.
server administrator or ISP specifies another port.
16 Chapter 2 Configuring Browsers and Servers
Field Description Comment
Disable passive mode
File time offset The number of hours ahead or
Assume UTC file times
4 Click OK to complete the configuration.
You can now work with files on the server.
Option to select if the server does not use passive connections.
behind the current local time to use in the date/time information for files on the FTP server.
Option to adjust date/time information on the FTP server for servers using the Universal Coordinated Time format.
If you set this value, you cannot select the Assume UTC file times option.
Select this if you see incorrect date/time information for files on the FTP server.
To view and edit the configuration for a remote server:
1 Right-click the server in the Macromedia FTP & RDS list and select Properties
from the popup menu.
2 Make the necessary changes, and then click OK to save the new server properties.
To do a file size check after transferring a file:
1 Save, copy, or move the local file to the remote server using either of the following
commands:
File > Save or File > Save As from the menu
File > Copy To or File > Move To from the right-click menu
2 If nothing happens, the file transfer was successful.
An error message appears if there is a discrepancy between the byte counts of the local copy and the copy saved to the remote server.
Enabling Secure FTP
Ipswitch FTP technology, installed with ColdFusion Studio, offers data security via Secure Sockets Layer (SSL) to servers that support 40-bit encryption and decryption. A default certificate and key are installed. The Ipswitch Help files are available for this dialog box.
Note
Unicode files cannot be transferred successfully using SSL, so disable the Secure
(SSL) feature in the Configure FTP Server dialog box before transferring these types of files.
Working with Files on Remote Servers 17
To enable SSL for an FTP connection:
1 Open the Properties dialog box and select the Secure (SSL) option. 2 Click the Configure SSL button and make the appropriate certificate entries.
Click the Help button for information on these settings.
3Click OK.
This table summarizes the error messages you could receive:
Error message Cause
Unable to connect to the FTP server.Success Remote Server Operation Failure: Winsock Error: Connection aborted.
Secure Connection Error - you have requested a secure connection to the server but either the server does not support SSL or WS_FTP could not negotiate a secure connection. This connection is NOT secure. Do you wish to continue?
SSL has not been enabled in the Configure FTP Server dialog box, and you attempt to connect to a server requiring SSL.
An SSL-enabled connection is selected at startup but SSL is disabled on the server.
To revert to the installed certificate and key:
1Select Options > Settings > File Settings > FTP & RDS > Reset FTP SSL Certificate
to Default.
2Click Apply.
Note
For this release, Un icod e and Unicode Big Endian files that are saved on SSL-enabled FTP servers do not get created and saved correctly.
Managing ColdFusion security for RDS
The ColdFusion installation configures basic security for the server and by default requires a password for the ColdFusion Administrator and for ColdFusion Studio.
To change the default security settings:
1Open ColdFusion Administrator. 2 Select Basic Security from the server link list. 3 Change password security settings as needed.
4 Click the Apply button at the bottom of the page.
18 Chapter 2 Configuring Browsers and Servers
Connecting to an RDS server
Complete the following configuration procedure for each ColdFusion server that you want to access.
To connect to an RDS server:
1 In ColdFusion Studio, click the Files tab at the bottom of the Resources window.
2. Open the Drive list at the top of the Files pane and select Macromedia FTP & RDS. 3 Right-click Macromedia FTP & RDS in the Directory list and select Add RDS
Server.
4. Complete the Configure RDS Server dialog box, as follows:
Field Description
Description Type a label for the server connection Host name Type localhost or an IP address Port Use Secure
Sockets Layer Remaining RDS
security fields
5 Click OK to save the server information. The server appears in the Macromedia FTP & RDS list in the Files pane and also in
Windows Explorer.
Managing servers
You can easily change server configurations as needed.
To view and edit the configuration for a server:
1 Right-click the server name in the Macromedia FTP & RDS list and select
Properties from the menu.
2 Make any changes as necessary in the Configure Server dialog box.
3 Click OK to save your changes.
To delete a server:
1 Right-click the server name in the Macromedia FTP & RDS list and select Delete
Server from the menu.
2 Click Yes when you are asked to confirm that you want to delete the server. The remote server is removed from the Macromedia FTP & RDS list.
Working with Files on Remote Servers 19
Adding server mappings
A development mapping is essential for working with files via Remote Development Services (RDS). Mappings serve two purposes:
To enable server-based processing of pages from within ColdFusion Studio
To enable debugging of application code on a remote server via RDS
Mapping for page processing
By default, when you browse a document in the internal or external browser, it is opened from the local file system or returned via FTP from a remote server. That is adequate for checking page content and formatting, but for developing a Web site you must see dynamic pages as the visitors to your site will actually experience them.
To do this, you can route the documents through a Web server. The server software can be on the local machine, a network server, or a remote system. So, instead of just opening the files, an HTTP request for the page is sent to the server. If any server-side processing is required, such as for CFML, JSP or other scripting, the Web server will hand off the page to the appropriate server for further processing, then return it to the browser. This is valuable for previewing applications and site elements in a test environment before deploying the site.
You establish this routing by associating the physical directories where your files are stored with the server that processes the files. This association is called a mapping. A wide range of Web servers is supported, so you can create multiple mappings and select which server to use for processing as needed. Consult your server documentation or provider for the specifics of accessing server directories.
Note
To use server mappings, either Microsoft Internet Explorer or Netscape Mozilla NGLayout must be configured as the internal browser.
Mapping for debugging
If you have ColdFusion and ColdFusion Studio on the same machine, you can run the debugger against files opened from the file system, including mapped network drives. But if you are working with a remote ColdFusion server via RDS, you must set a mapping to that server to run the debugger.
Note
To debug applications from ColdFusion Studio, you must also complete the procedures in “Debugging Application Code” on page 117.
Understanding RDS Mappings
A file mapping ensures that ColdFusion Studio, the RDS server, and your browser can properly resolve a local path into a server path and URL.
20 Chapter 2 Configuring Browsers and Servers
Anwer these questions in the RDS dialog box:
Studio Path How does ColdFusion Studio see the directory?
ColdFusion Path How does the Web server/ColdFusion server see the
directory?
Browser Path How does the browser see the directory?
Note
An error will occur if you try to browse a file when there is a mismatch between the Studio Path in a mapping defined in the Remote Development Settings and the path of the active file. For example, you cannot browse a file opened from a mapped drive unless that drive path matches the mapping path.
The next section presents the most common RDS mapping scenarios.
RDS file mapping examples
The following scenarios show how file mappings work when you have local or remote files matched with either local or remote servers:
ColdFusion Studio and ColdFusion on the same machine
Studio debugging on a remote ColdFusion server using drive mappings
Studio debugging on remote server using Network Neighborhood
Studio debugging on a remote server using RDS file access
Using local paths
Debugging against a local ColdFusion Server (localhost) is the most common scenario. In most cases, this arrangement allows both Server and Studio to see the directories in the same way.
For example, the local path c:\inetpub\wwwroot translates to an identical server path C:\inetpub\wwwroot, and a URL path of http://215.180.21.1/. The use of mappings in such a scenario is mainly for URL resolutions. The URL part of the mapping instructs Studio how a physical file can be viewed in a browser.
In this example, you would create a mapping as follows:
Server and Studio on same machine
Studio path C:\inetpub\localhost\ Server path C:\inetpub\localhost\ Browser/URL path http://215.180.21.1/
Using drive mappings
Developers often debug against a remote server across an internal network. In many cases, they use a network drive mapping.
Working with Files on Remote Servers 21
For example, a user might have a remote drive X:\ mapped to a network shared directory \\MYSERVER\WEBPROJECTS\ where WEBPROJECTS is the name of the shared directory in the network server MYSERVER.
In such a scenario, a file that appears to Studio as
X:\App1\index.cfm
might be viewed by the server as
C:\webprojects\App1\index.cfm
and the browser might view it using the URL path
http://215.180.21.1/App1/index.cfm
In order to resolve the communication between Studio and Server, you must create a mapping for the App1 directory as follows:
Studio access to a remote server using drive mappings
Studio path X:\App1\ Server path C:\webprojects\App1\ Browser/URL path http://215.180.21.1/App1/
Using UNC paths/Network Neighborhood
Developers can debug code against remote ColdFusion servers across an internal network using UNC paths. They often use the Network Neighborhood to access a file on a remote server. For example, a developer might access a file on \\myserver\webprojects\ where webprojects is the name of the shared directory in the network server myserver.
In such a scenario, a file that appears to Studio as
\\myserver\webprojects\App1\index.cfm
might be viewed by the server as
c:\webprojects\App1\index.cfm
and the browser might view it using the URL path
http://215.180.21.1/App1/index.cfm
Studio and Server need to understand how a file location appears to the parties involved. You therefore must create a mapping for the App1 directory as follows:
Studio accesses files on remote server using UNC paths/Network Neighborhood
Studio path \\MYSERVER\WEBPROJECTS\App1\ Server path C:\webprojects\App1\ Browser/URL path http://215.180.21.1/App1/
22 Chapter 2 Configuring Browsers and Servers
Using Remote Development Services
When developing outside local area networks, you access files on a ColdFusion server across the Internet using Remote Development Services (RDS).
In such a scenario, a file that appears to Studio as
RDS://MY_RDS_SERVER/C:/webprojects/App1/index.cfm
might be viewed by the server as
C:\webprojects\App1\index.cfm
and the browser might view it using the URL path
http://215.180.21.1/App1/index.cfm
Although the server path can be inferred from the local RDS path, you must still create a mapping. In special scenarios, ColdFusion server to Studio path resolution could become ambiguous. You therefore must create a mapping for the App1 directory as follows:
Studio accesses files on remote server using RDS remote file access
Studio path RDS://MY_RDS_SERVER/C:/WEBPROJECTS/App1/ Server path C:\webprojects\App1\ Browser/URL path http://215.180.21.1/App1/
Defining server mappings
This section provides instructions for adding a server mapping in ColdFusion Studio and in Microsoft Internet Information Server® (IIS), and how to set a default mapping.
For more information on setting up server mappings, see Knowledge Base Articles 8347 and 8500 on the Macromedia Web site. (Note that the information in these articles applies to Studio as well as to HomeSite.)
To add a mapping:
1Open the Options > Settings > Browse pane. 2 If necessary, select either Microsoft Internet Explorer or Netscape Mozilla
NGLayout as the internal browser.
3 Click the Development Mappings button to open the Mapping tab on the Remote
Development Settings dialog box.
4Select a server from the drop-down list of configured servers. If a server is not on
the list, add it. For instructions, see “Adding server mappings” on page 19.
5 Enter the Studio, ColdFusion, and Browser path information. For page browsing
on localhost, only the Studio and Browser paths are required.
6 Click the Add button to save the mapping, then click OK.
You can now browse your documents in the internal (F12) or external (F11) browser.
Working with Files on Remote Servers 23
To edit a mapping:
1 Select a mapping from the list. 2 Make changes as necessary and click Update.
To change to a different mapping:
Select the mapping to switch to in mappings list.
To set a mapping as the default:
1Select Options > Settings and click Browse. 2 Select the entry that you want to move in mappings list. 3 Click the up arrow button to move the entry to the top of the list.
4Click OK.
24 Chapter 2 Configuring Browsers and Servers
Chapter 3
Exploring the Workspace
This chapter acquaints you with the main areas of the interface. It also gives you some pointers on customizing the workspace to make all of your development work as productive as possible.
Contents
The Workspace Areas................................................................................................ 26
Working in the Resources Window .......................................................................... 27
Creating and Browsing Files in the Document Window ........................................ 29
Tracking Your Work in the Results Window ............................................................ 30
Customizing the Workspace..................................................................................... 31
Getting the Most from the Help System.................................................................. 35
26 Chapter 3 Exploring the Workspace
The Workspace Areas
The term workspace describes the user interface that you see when you first load the program. The workspace has four principal areas:
Command area At the top of the workspace is the title bar, which displays the
file path of the current document. Below that is the menu bar, which contains standard Windows commands plus development menus. Below the menus are toolbars that provide one-click access to commands and application tools. To the right is the QuickBar, a tabbed toolbar for inserting JSP, HTML, and other language elements.
Resources window Tabs for file management, data sources, projects, code
snippets, online Help, and the Tag Inspector.
Document window Tabs for writing and browsing pages.
Results window Tabs to track search and replace operations, code validation,
link verification, images, project deployment, and compilation.
The following illustration shows the main workspace areas.
Working in the Resources Window 27
Setting workspace options
Selecting Options > Settings (F8) opens the control center for user preferences. By navigating the feature tree in the left pane, you can view and change options for file management, coding, and testing applications and Web content.
Working in the Resources Window
The Resources window is a tabbed user interface that gives you quick access to file management, development, and Help resources. Select a tab at the bottom of the window to open the pane for each resource. Context menus and specialized toolbars provide a focused set of commands for each pane.
Following is a description of each resource tab.
About the Resource tabs
Following is a summary of each of the Resource tabs:
Files tabs Lets you manage files on local and network drives and on remote
servers. The drop-down list at the top allows you to pick a drive or server, the bottom two panes display directories and files for the selected drive or server. The two Files tabs, labeled “1” and “2” for easy identification, facilitate working with files in multiple locations, including directories, drives, and remote systems.
Following are some tips on how the two Files tabs work together:
You can use the standard copy/move and paste commands between tabs.
If you undock one or both of the tabs, you can drag files and folders between
them. To move them, drag them. To copy them, drag them while holding
down the Ctrl key.
When you select Filter or View from the right-click menu, the setting is only
applied to the active tab; the system maintains separate settings for each tab.
Both file tabs share the same Favorite Folders settings.
If both file tabs point to the same location, the system refreshes both tabs to
display changes to files and folders in that location. For information about how ColdFusion Studio determines the current directory
with two Files tabs, see “About the Files Tabs” on page 44.
Database tab Shows your application data sources. When you add a data
source, it appears in the drop-down list at the top. Just select a data source to view its schema. You can write and test database queries in the SQL Builder.
Projects tab Helps you manage site content by organizing pages and
supporting files. You have the option of adding a project to your version source control system. The drop-down list at the top displays recent projects. The bottom two panes display the folders and files for the selected project.
Site View tab Provides a visual representation of each link in the current
document. Right-click in the pane to select a view type and display options. Right-click on a link to expand the view.
28 Chapter 3 Exploring the Workspace
Snippets tab Provides a convenient place to store code blocks and content for
reuse. Snippets can also be shared with other users.
Help tab Contains product documentation and other online resources. You can
customize the help by adding help files and editing existing help files. For more information, see “Extending the Help system” on page 39.
Tag Inspector tab Lets you edit in an interactive property sheet user interface.
The top pane is the Ta g Tree, a customizable view of the document hierarchy. The bottom pane is the Tag Inspect or, where you can edit code without having to work in the Document window directly.
Creating and Browsing Files in the Document Window 29
Creating and Browsing Files in the Document Window
The Document window is the center for code and content development. It has tabs for working in Edit and Browse mode, and to view Help. You can press F12 to switch from the Help to Edit tab, and press F12 again to switch from the Edit to Browse tab.
The rest of this section describes each tab in detail.
Tip
To edit your page visually, you can open it in UltraDev from ColdFusion Studio. UltraDev enables you to prototype page layouts, create HTML tables and forms, set font and image formatting, generate DHTML elements, and more. For instructions, see “Adding Document Content” on page 61.
Edit tab
This tab contains the HTML editor, which has many productivity features for creating and editing code, content, and navigation structures. You can easily insert tags, generate code, and add content from text files, Microsoft Office applications, or directly from the Web. You can easily create templates to insert common content.
The Edit toolbar extends vertically to the left of the Document window below the Edit tab when the Edit tab is selected. A descriptive tooltip appears for each button when you position the cursor over it.
Browse tab
This tab displays the current document in the internal browser. This is handy when you are making many changes to a page that does not require processing by a server, for example to preview formatting changes.
The Browse toolbar displays at the top of the Document window when the Browse tab is selected. You can position the cursor over each toolbar button to see a descriptive tooltip. You can use the toolbar to browse open documents, refresh the display, and access browser tools. The document URL displays according to the current server mapping. For details, see “Configuring External Browsers” on page 11.
You can press F12 to display the current document in the internal browser, or press F11 to view the document in the default external browser.
30 Chapter 3 Exploring the Workspace
Help tab
This tab displays tag-specific Help and pages from the Help References. This tab becomes visible in the workspace when you first open it.
To open the Help tab, do one of the following:
Press F1 in a tag editor
Select a tag in Tag Chooser and press F1
In the Editor, position the cursor in a tag and press F1
On the Help Resources tab, open a page from the Help References tree
Tracking Your Work in the Results Window
The Results window presents the results of document operations in individual panels. It opens automatically when you run an extended search (Extended Find or Extended Replace), Code Validation, Link Verification, Image Thumbnails, or Project Deployment. You can also open it from the View menu.
Right-click in any of the panels to open a menu of commands that apply to the panel.
Customizing the Workspace 31
Customizing the Workspace
There are many ways to customize the look and functionality of your workspace, including setting the display and positioning of toolbars and Resource window tabs; assigning shortcut keys for commands, code snippets, and scripts; and creating custom toolbuttons. This section provides instructions for using these basic customizations.
Advanced customizations, such as editing tag editors and creating new ones, can be easily accomplished using the Visual Tools Markup Language (VTML). For VTML tutorial and reference information, see “Customizing the Development
Environment” on page 169.
Managing application toolbars and the QuickBar
The application toolbars and the QuickBar are divided by location, by function, and by the level of customization available.
The application toolbars, on the left of the workspace, provide standard Windows commands plus access to tools such as external browsers, the Style Editor, Code Validation, and the Link Checker.
The QuickBar, on the right of the workspace, lets you easily insert tags from any of the supported languages.
You can change the order of tabs on the QuickBar, hide a default toolbar, show a toolbar that is hidden by default, or move a toolbar.
To open the Customize dialog, do one of the following:
Right-click in the toolbar or QuickBar area and select Customize.
Select Options > Customize from the menu.
The Customize dialog box appears, with the Toolbars tab selected by default.
To change the order of tabs in the QuickBar:
1 In the workspace, right-click in any toolbar or Quickbar and select Organize
QuickBar from the popup menu.
2 In the Organize QuickBar dialog box, select names of tabs and press the up and
down arrows as needed. The tab on the top of the list appears on the far left side of the QuickBar.
3 When you are satisfied with the order of the tabs, click Close.
32 Chapter 3 Exploring the Workspace
To hide or show a toolbar:
1 In the Customize dialog box, in the Visible Toolbars box, clear the checkbox next
to the toolbar you want to hide.
2 To show a toolbar, select the checkbox next to the toolbar in this same list.
Tip
To reset the default settings for which toolbars are shown or hidden, click Reset to Defaults in the Customize dialog. This also moves every toolbar back to its default position. However, it does not affect the contents of any toolbar, so any changes made to buttons within a toolbar are preserved.
To move a toolbar or QuickBar:
1 In the workspace, drag a toolbar or QuickBar by its handle (the two vertical bars
on the left edge of the toolbar) to a new location. For a QuickBar, make sure the QuickBar you want to move appears on top before
dragging it to a new position.
2 To move every toolbar back to its default position, click Reset to Defaults in the
Customize dialog. This also resets the default settings for which toolbars are shown or hidden. However, it does not affect the contents of any toolbar, so any changes made to buttons within a toolbar are preserved.
Tip
As an alternative, to move back the toolbars and QuickBars that are not docked anywhere in the workspace, you can right-click in the toolbar or QuickBar area and select Dock floating toolbars.
Customizing toolbars
There is a lot of functionality available in the product that you can access by adding a special button to a toolbar. It is worthwhile to review the Toolbuttons list on the Toolbars tab of the Options > Customize dialog box.
Besides adding buttons to a toolbar, you can add your own custom buttons, remove buttons from a toolbar, change the order of buttons in a toolbar, add a custom toolbar, or remove a custom toolbar.
To add a button to a toolbar:
1Select Options > Customize from the menu to open the Customize dialog box. 2 In the Visible Toolbars box, select the toolbar to which you want to add a button.
Tip
If you are using the default workspace, you might want to select View, since this toolbar has room for a few more buttons.
Customizing the Workspace 33
3 In the Toolbuttons box, click the vertical scrollbar and drag it down until you see
the button you want to add.
4 Click the button in the Toolbutton box and drag it to a free space in the toolbar
shown under Toolbar View. The button is added to the toolbar.
5 Click Close to return to working in the product.
To add a custom button to a toolbar:
1Select Options > Customize from the menu to open the Customize dialog box.
2 In the Visible Toolbars box, select the toolbar to which you want to add a button. 3 Click Add Custom Button to display the Custom Toolbutton dialog box. 4 Specify what you want the custom toolbutton to do:
To insert start and end tags into the current document, select Insert custom
start and end tags into the current document, and complete the Start Tag and
End Tag boxes.
To display a custom dialog box, select Display a custom dialog and complete
the Dialog File box with the full path of the VTML file.
To launch an application (other than UltraDev, which already has a button in
the Editor toolbar), select Launch external application, complete the
Filename box with the full path of the program’s executable file, and complete
the Command Line box with necessary commands, such as %CURRENT% to
pass the current document’s name to the external program.
To run an ActiveScript file, select Execute an ActiveScript file and complete
the Script File box with the full path of the script file.
5 Click the browse button and select an image file, or type the full path of the image
for the button in the Button Image box. This is not applicable when launching an external application.
6 In the Caption box, type a text label to appear under the button when a user
chooses to display both buttons and their captions. This is not applicable when launching an external application.
7 In the Button Hint box, type text for the button’s tooltip. 8 When you are done, click OK.
The button is added to the selected toolbar.
To change the order of buttons in toolbar:
1Select Options > Customize from the menu to open the Customize dialog box. 2 In the Visible Toolbars box, select the toolbar whose buttons you want to
rearrange.
34 Chapter 3 Exploring the Workspace
3 On the toolbar shown under Toolbar View, drag each button you want to move to
its new location. The buttons are rearranged in your toolbar as you make changes.
4 Click Close to return to working in the product.
To remove a button from a toolbar:
1Select Options > Customize from the menu to open the Customize dialog box.
2 In the Visible Toolbars box, select the toolbar from which you want to remove a
button.
3 Drag the button you want to remove to a place outside of the toolbar shown
under Toolbar View. The button is removed from the toolbar.
4 Click Close to return to working in the product.
To add a toolbar:
1Select Options > Customize from the menu to open the Customize dialog box. 2 Click Add Toolbar to the right of the Visible Toolbars box.
3 In the Add Toolbar dialog box, type a name for the toolbar and click OK. 4 Add buttons and separators to the new toolbar as needed. 5 Select the checkbox next to the new toolbar to make it visible in the workspace.
To delete a custom toolbar:
1Select Options > Customize from the menu to open the Customize dialog box. 2 In the Visible Toolbars box, select the toolbar you want to delete and click Delete
Toolbar.
3 Click Yes to confirm. The custom toolbar is removed. You cannot remove a standard toolbar, but you can
hide it.
Getting the Most from the Help System 35
Getting the Most from the Help System
The online Help system encompasses a variety of features:
Pop-up Help for basic tag syntax (F2)
Comprehensive context-sensitive tag Help (F1)
Embedded Help in tag editors, Tag Chooser, and Expression Builder (F1 and
Ctrl+F1)
An extensive collection of searchable references in the Help tab
Opening Help in tag editors and Tag Chooser
Help text in tag editors and in the Tag Chooser provides context-sensitive syntax and usage information.
To view Help in a tag editor or Tag Chooser do one of the following:
To display Help text in the dialog box, click the Toggle Embedded Help button.
To see Help text in a new browser window, click the Show help in separate
window button (Ctrl+F1)
To display Help text on the Help tab, press F1.
For more information, see “Help tab” on page 30.
Editing Help in tag editors and Tag Chooser
Using the Visual Tools Markup Language (VTML), you can edit Help text in dialog boxes or add your own. For details, see “Customizing the Development
Environment” on page 169.
Accessing Help References
The online Help References contain the printed product documentation in HTML format and additional online references. They are an extensible resource for learning about product features, technology extensions, and other development topics.
Click the Help tab at the bottom of the Resources window to view the Help References tree. The Help toolbar is located at the top of the Help References pane.
Printing Help topics
If you are using Internet Explorer as the internal browser, you can print a Help topic by right-clicking the document in Browse mode and selecting Print.
The default internal browser does not support printing.
36 Chapter 3 Exploring the Workspace
Bookmarking Help topics
You can quickly access your favorite Help documents by bookmarking them. You can assign bookmarks to documents in the Help tree, the file system, or the Internet.
To bookmark a document in the Help Tree:
If the Help document is closed, right-click the document title and click Add
bookmark.
If the Help document is open, it automatically displays in the Bookmarks list. If
the document is not open, right-click again and select Refresh.
To bookmark an external document:
1 Click the down arrow next to the Bookmarks button in the Help toolbar and click
Organize Bookmarks. The Help Bookmarks dialog box appears.
2 Click Add to open the Add Bookmark dialog box.
3 Type a name for the bookmark. 4 Click Browse and find the document to bookmark, or type the appropriate URL
or file path.
5 Click OK to add the bookmark to the Help Bookmarks list. 6 Click Close to save your changes and return to the Help Resources tab.
To open a bookmarked Help document:
1 Click the down arrow next to the Bookmarks button on the Help tab toolbar 2 Select from the list.
To maintain bookmarks:
1 Click the down arrow next to the Bookmarks button in the Help tab toolbar and
click Organize Bookmarks. The Help Bookmarks dialog box appears.
2 Add, remove, and rename bookmarks as needed:
To add a bookmark, click Add. In the Add Bookmark dialog type a name for
the bookmark and then either type a file path or URL to bookmark or click
Browse, find the file or Web page to bookmark, and click Open. Click OK.
The bookmark appears in the Help Bookmarks dialog box.
To remove a bookmark, click the bookmark to remove and click Remove.
The bookmark disappears from the list.
To rename a bookmark, click the bookmark to rename, click rename, type the
new name as necessary, and then press Enter.
3 When you are satisfied with your list of bookmarks click Close.
Getting the Most from the Help System 37
Searching Help References
You can access a book’s online index in the Help reference tree, or you can search the entire set of Help References using simple to complex search criteria.
Using an online index
With the exception of language references, each book in the Help reference tree on the Help Resources tab has an online index.
To search a book using an index:
1 Decide on the term or terms you want to find in the index. 2 Do one of the following:
Click the Help Resources tab, click the Help reference tree button in the Help
toolbar, and open the book you need to search. Double-click the Index page.
In the top right corner of a topic, click the Index button to open the index for
that topic’s book (make sure that you search the correct book). The Index for the selected book appears with a link for each letter of the alphabet.
3 Click the link for the first letter of your search term, and scroll the list of terms as
necessary to find the term. Repeat this step for every search term you need.
Using the full-text search engine
To Search Help References for the first time on your system, you should allow the program to index the files; that is, to generate a full-text search database from the Help reference tree contents. This greatly improves the search engine performance.
After the initial indexing, each time you open the Help panel the program checks the Help References tree for changes. If Help files have been added or deleted, the program automatically indexes the Help files again.
If you have problems with Help Search, re-index (regenerate the search database for) the contents of the Help folder. To do so, close the program, delete the Verity/Collections folder in your installation directory, open the program again, and run a search. Click Yes to allow Verity to re-index the Help files.
To do a full-text search of every Help Reference:
1 Click the Search button on the Help toolbar to open the Search Help References
dialog box.
2 If this is the first time to run a search on your system, you are prompted to index
the Help References. Click Yes.
3 Type a word or phrase in the Enter the word(s) to find box.
For information on using search operators, click the Search Tips button.
4 To limit the references searched, select the Search only in selected references
option and select the check box next to one or more references.
38 Chapter 3 Exploring the Workspace
5 Click the Search button to display the search results in the Help References pane. 6 Double-click a document in the results list to open it.
The results list is saved until a new search is run, so you can return to the document list by clicking the Search results button on the Help toolbar.
Tip
To redo a recent search, click the down arrow next to the Enter the word(s) to find box and select the search keywords you previously used from the drop-down list.
Using advanced search operators
You can use a variety of advanced search operators to make your searching more precise. For information on using advanced search operators, click the Search Tips button in the Search Help References dialog box.
To print the search, open Help/Macromedia Support/VeritySearchTips.htm and use your browser’s print command.
Making and viewing comments in the Help system
You can comment directly on our online documentation, or view others’ comments.
To view or make comments in the online documentation:
1 Display the page in the online documentation for which you want to read or
make comments.
2 At the bottom of the page, in the Comments section, click View comments on
Live Docs. A live version of the page from our Web site appears.
3 At the bottom of the Web version of the page, you can read all of the user
comments about that page. If there are no comments for that page, only a button appears.
4 To add a comment of your own, click Add Comments. 5 The first time you make a comment, you must create an account on the system:
aClick Add User. b In the User Information page, complete the bold fields and any other fields. cClick Add User Profile. Now you can log in from any online documentation page to add comments.
6 In the Please Comment page, type your comment, answer any of the questions in
the form as desired, and click Add Comment.
Your comment is added to the system, and members of the Macromedia documentation group are notified.
Getting the Most from the Help System 39
Members of the Macromedia documentation group then attempt to correct errors and clarify points directly on the Comments page. Larger documentation issues are targeted to the next product release. And, in general, they use your feedback to assess the effectiveness of their user guides and to improve them.
Note
LiveDocs is not technical support. For technical issues, you should go to the Technical Support page on the Macromedia site to view support options.
Extending the Help system
One of the Help system’s most useful features is its extensibility. You can add documents to the Help system by dragging and dropping them into the Help folder, either from the Files tab or Windows Explorer.
Help document files are generally in HTML, but you can include text files. The Help browser will use the file name as the title. You can also create a link from within an HTML file to files with txt, dtd, and pdf extensions if you use Internet Explorer as the internal browser. Web graphics files (GIF, JPG, PNG) are viewable in Help files.
This extensibility enables you to:
Write and install your own custom Help files
Download documents from the Web and add them to the Help system
Edit existing Help topics
Distribute Help files; this can be particularly helpful for a development team
Note
Documents do not display at the Help References root level, so you must either place them in an existing folder or create a new folder.
Adding custom help to the Help tree
You can add files or whole references (folders) to the Help reference tree.
To create a new folder in the Help tree:
1 Open the Files pane in the Resources window.
2 Navigate to the Help folder of your installation. 3 Right-click in the Files pane and select Create Folder.
A new folder with a highlighted name box appears.
4 Type a name for the folder in the box and press Enter to save the new folder.
5 If necessary, press F5 to refresh the Help display. The new folder appears at the bottom of the Help reference tree.
40 Chapter 3 Exploring the Workspace
To add documents to the Help tree, do one of the following:
Write an HTML Help file and save it to a folder in the Help directory
Use standard Windows commands to paste a file into a Help folder
Display the document to add in a Web browser and then choose the Save As
command to save it to a folder in the Help directory
Changing the order of items in the Help tree
If you add a folder to the Help directory, the folder appears at the bottom of the Help reference tree. For most users, this is all you need.
If, however, you want to control the order in which the Help References display, you can edit the booktree.xml file in the Help root directory. The structure of the booktree file uses a simple tag set to configure how the Help displays on the book, chapter, and page levels. A quick study of the file will get you started.
The parser reads the booktree tags from top to bottom, so you can just insert folder and file tags where you want the references to appear in the Help tree. You can edit this file to rearrange existing Help content as well as to add custom folders and files to a specific location in the Help tree. Alternately, you can use the the book and chapter tags to specify the folder’s location on your system.
To add a folder to a specific location in the Help tree:
1 In Windows Explorer, open the Help root directory, make a backup copy of the
booktree.xml file, and copy the new folder into the Help root directory.
2 In the product, open the new Help folder from the Files resource pane.
3 Open the booktree.xml file in the Editor. 4 Add a book tag for the new folder and save the file.
Following is an example:
<help_book path="folder name”>Custom Help Files
The new folder now appears in the order you set up, but the files in the folder appear in alphabetical order. If you want to control the order of chapters and pages, add tags in the booktree file for these entries and arrange them to be in your desired order.
path attribute in
Displaying text files in the Help tree
Text files can be added to the Help reference tree. The Help browser default file type is HTML, so it looks for a empty, it displays the filename as the document’s title in the Help tree.
To change an HTML file’s title in the Help tree, edit the HTML file to complete its
<title> tag with the desired name.
To change a text file’s title in the Help tree, first make a backup copy of the booktree.xml file in the Help root folder of your installation directory. Then open booktree.xml in the editor, find the
attribute for the text file; for example,
TITLE tag in each file. If it does not find one, or if the tag is
<help_page> tag for the text file, and add a title
<help_page title="My Readme">.
Getting the Most from the Help System 41
Adding media content
You have considerable flexibility in adding supporting files (such as graphics, animations, video, and sound) to Help documents. There are two ways to do this:
Create a file structure in the Help tree that conforms to the media file references
in your documents. For example you might copy an Images folder into your custom help folder.
In your custom documents’ references to media content, supply a URL or
accessible file location for remote files. For example you might reference a remote site to display a chart of the NASDAQ, so the chart remains up-to-date. Generally, this approach is not optimal for adding static information, since external servers can go down and/or your system can slow down.
Note
If you are using the default internal browser or an older external browser, proper playback of media files is limited.
42 Chapter 3 Exploring the Workspace
Chapter 4
Managing Files
This chapter describes how to perform file management tasks such as opening, closing, saving, and automatically backing up files. This chapter also describes how to work with Unicode and DBCS (Double-Byte Character Support) files.
The tasks described in this chapter do not replace the need for creating a project to organize the files in a Web site or Web application. For instructions on how to use projects, see “Managing a Web Site with Projects” on page 125.
To manage remote files, see “Working with Files on Remote Servers” on page 13.
Contents
About the Files Tabs ..................................................................................................44
About File Encoding.................................................................................................. 45
Working with Files.....................................................................................................46
44 Chapter 4 Managing Files
About the Files Tabs
The Files tabs in the Resources Window give you access to servers, drives, directories, and files without having to go to Windows Explorer.
Having two Files tabs reduces the amount of file system navigation needed to work across multiple directories and drives.
Several operations—such as opening and saving files, backing up before replacing text in files, displaying thumbnails for the images in a folder, browsing to files in tag editors, and creating an image map—refer to the current directory.
About File Encoding 45
The Files tabs use these rules to determine which directory is the current directory:
When browsing to a file in a tag editor, the current directory is the folder that the
current document is in. Options > Settings > General > Display current folder in file dialogs must be set.
Otherwise:
If only one File tab is visible, the current directory is the one displayed in the
visible File tab.
If both Files tabs are visible, or neither Files tab is visible, then the current
directory is the one displayed in the primary Files tab (Files 1 tooltip).
You can move and dock tabs, for example to display or hide both Files tabs.
About File Encoding
If you work with non-ANSI encoded documents, you can open encoded files and save files with character encoding. The following encoding formats are supported:
ANSI (Current system code page)
Unic ode
Unicode Big Endian
UTF-8
Processing files from Unicode encoding formats involves code page checking, detection of file encoding, and format conversions. Therefore, enabling non-ANSI file encoding slows document handling operations in the Editor. You can also work with ANSI files while working with Unicode files, but for optimal system performance, you should only enable non-ANSI file encoding when you need to open or save Unicode files.
By default, files are not handled as Unicode.
Note
Unicode files cannot be transferred successfully using an SSL-enabled FTP server. Therefore, disable the Secure (SSL) feature in the Configure FTP Server dialog box before transferring these types of files.
To enable non-ANSI file encoding:
1In the Options > Settings > File Settings pane, select Enable non-ANSI file
encoding.
2 If desired, select the option to display encoding information on the document tab
in the Editor window. This is a handy reminder if you are working with varied file formats.
3 Click Apply to save your changes.
46 Chapter 4 Managing Files
Working with Files
You can use the following procedures to work with files, regardless of their location (local drive, network drive, or remote server).
Opening and saving files refer to the current directory. For information about how ColdFusion Studio determines the current directory with two Files tabs, see “A b o u t
the Files Tabs” on page 44.
Setting startup options
To set startup options:
1Select Options > Settings > Startup to select which files and folders open when
you load the program.
2 Select any of the startup options to:
Open all the documents that were open when the program last closed
Open the project that was open when the program last closed
Open a blank document
3 Select one of the following startup folder options to:
Open the folder that was last active in the Files tab
Open the folder that was last selected in the File > Open dialog box
Specify a default folder to open at startup
4 Click OK to close the Settings dialog box and save your new settings.
Opening files
Use the procedures below to open a file in the file list.
To open a standard file:
1 On the Files tab, use the Drive List and the Directory List to navigate to the
2 Double-click the file in the file list or right-click the file and choose Edit from the
Note
Read-only files are marked with a red dot in the file list. You can right-click a file and choose Properties from the menu to set read and write access. This is not recommended, however, if you are using a source control application to manage read and write privileges.
directory that contains the file you want to open.
menu.
Working with Files 47
To open an encoded file:
Before opening the file, make sure you have Unicode formatting enabled.
If you do not, enable it. For instructions, see “About File Encoding” on page 45.
If you attempt to open a Unicode file without having selected the Enable non-ANSI file encoding option, the encoding format of the file cannot be detected or handled properly. The file is loaded as an ANSI string of the same type as is specified in your system language settings.
To open a recently used file:
1 Select the File > Recent Files list . 2 Open any of the last ten closed files. If you use this feature regularly, you can maintain the list by clearing it or removing
obsolete files when needed.
Copying, moving, renaming, or deleting a file
You can right-click a file in the file list and select a command in the popup menu to copy, move, rename, or delete the file.
Adding a link to an open file
To create a link to a file:
1 Open the page you want to place the link in the Editor. 2 Drag the file you want to create a link to from the file list to the page in the Editor.
Release the mouse button when the cursor is in the location where you want the link to be added.
Note
Alternatively, you can right-click a file and select Insert As Link from the menu. The link is inserted in the current page at the cursor location.
Saving files
This section describes standard file saving behavior and the file saving behavior when saving a file with encoding.
Saving standard files
Unsaved changes in a document are indicated by an “X” next to the file name in the Document tab at the bottom of the Editor window.
48 Chapter 4 Managing Files
Use the Save commands from the File menu or the Standard toolbar icons to save and close files. Open the Settings dialog box (F8) and use the File Settings pane to specify a format for saved files. The default is PC, but UNIX and Macintosh formats are available. You can set a default file extension on this tab, as well.
When you add a link or image to a new file, you are prompted to save the file. This ensures that the relative path to each of these page elements is resolved correctly.
Saving files with encoding
If you work with non-ANSI encoded documents, you can select character encoding from the Save As dialog box.
For this release, do not save a file as Unic ode or Unicode Big Endian on an
SSL-enabled FTP server, or else the files will not be created and saved correctly.
Also, saving Unicode files may result in 0-byte files being written. This is a known problem that tends to occur when changing Unicode encoding selections.
To save a file with encoding enabled:
1 Open the document to save with encoding and select File > Save As. 2 In the Save As dialog box, select a format from the Encoding drop-down list.
3 (Optional) Select Check the document character set.
This displays a warning message if the Save As encoding selection conflicts with the file’s document character set statement (the <meta> charset statement in HTML), or the encoding attributes in an XML processing instruction. You can then cancel the Save As operation and reconcile the encoding formats.
4 Complete the other fields as you would in a normal Save As operation and click
Save. The file is saved with the encoding you specified.
Backing up files
This section describes how you can use Auto-Backup to your best advantage.
About Auto-Backup
This much requested feature is similar in operation to the backup systems in many desktop applications. It is a convenient way to save files while working, but more importantly, it can be a safeguard against the loss of local and remote files caused by program or system crashes, network disruptions, or power outages.
Auto-Backup can do the following:
Create a backup before the original file is saved.
Create a backup of all open, modified files at a timed interval.
Create a backup of files modified by search and replace operations.
In addition, the Search > Extended Replace dialog box lets you backup files affected by a Replace operation and select a Backup Location.
Working with Files 49
How Auto-Backup works
Following are the steps that the product takes in order to back up your files: 1 A default AutoBackup folder is created below the product directory during
installation. You can change the location to a different local or network directory as needed.
2 A control file named AutoBackup.ini is automatically created to track files in the
selected backup location. If you change the backup location, a new .ini file is created there.
3 When working on a file, Auto-Backup creates a backup file with the following
name convention: filename + an incremented 3 digit number + the file extension, for example, myfile000.htm.
4 If the application closes abnormally, all open files saved by Timed Backup will
open in the editor when the application re-starts.
5 If Timed Backup is not enabled and the application closes abnormally, you can
open the last backup version of a lost file from the backup location.
6 A Timed Backup file is deleted when the original file is saved or when the
application closes normally.
Using Auto-Backup
This section provides instructions for setting Auto-Backup options and using Auto-Backup to manage backups or to recover a lost file.
To set Auto-Backup options:
1Open the Options > Settings > Editor > Auto-Backup pane.
Auto-Backup is enabled by default.
2 Accept the default backup directory or select a different one. 3 For Auto-Backup on Save, set the following as necessary:
Use the backup directory for local and network files, or save the backup with
the original file. Note that the backup directory is always used for remote files.
Set a time interval (in days) after which backup files are deleted.
4 For Timed Auto-Backup, set a time interval (in minutes) to save all open modified
files.
To manage backups created by the Auto-Backup:
Use the Options > Auto-Backup File Maintenance dialog box to manage backups
created during Save and Extended Search and Replace operations.
50 Chapter 4 Managing Files
To recover unsaved files after the application closes abnormally:
1 Open ColdFusion Studio again. 2 If you have set options for Timed Auto-Backup, the Timed Auto-Backup Recover
dialog box automatically appears. Recover each lost file by selecting it and clicking OK.
3 Otherwise, select Options > Auto-Backup File Maintenance and, in the
Auto-Backup File Maintenance dialog box, check the files that you need to recover and select File > Open Selected Files for Edit.
The files are opened in the Editor.
Changing the file list display
You can arrange the file list to display exactly what you want.
To filter the file list:
1 Right-click in the file list and choose Filter from the menu. 2 From the Filter submenu, choose the file type you want displayed:
Web Documents displays Web documents only
We b Im ages displ ays Web image s only ( JPEG, JPG, PNG, and GIF)
All Web Files displays both Web documents and Web images
All Files displays all files in the selected directory
Note
Use the File Settings pane in the Settings dialog box (F8) to view and edit the list of file extensions that are included for Web documents and Web images.
To change the file list view:
1 Right-click in the file list and choose View from the menu.
2 From the View submenu, you can toggle the display of the document title,
document size, modified date/time, and document type.
Press F5 to refresh the file list display.
Dragging files from Windows Explorer
You can drag a file from the Windows Explorer into the active document in the editor window create a link to it.
If you hold down the Ctrl key while dragging the file into the editor, the file will open in a new document. If the file is not a recognized file type, you are prompted to open it in the associated program for that file type.
Working with Files 51
Building a favorite folders list
You can build a list of favorite folders to make accessing their files easier.
To add a folder to the favorites list:
1 Select the folder in the Directory List. 2 In the file list, right-click and select Favorite Folders > Add Current Folder to
Fav ori tes .
The folder is added to your favorites list for easy selection.
To view a favorite folder:
1 Right-click in the file list and select Favorite Folders from the menu.
2 From the Favorite Folder submenu, select the folder you want to see. The folder is opened in the Directory List and its files are displayed in the file list.
To organize your favorite folders:
1 Right-click in the file list and select Favorite Folders > Organize Favorites from
the menu to see the Favorite Folders dialog box.
2 Select a folder and use the up and down arrows to move its location in the favorite
folders list.
3 Select a folder and click Remove to remove it from the favorite folders list. When
you are prompted to confirm the deletion, click Yes to delete the folder.
4 Click OK to close the Favorite Folders dialog box and apply your changes.
Downloading Web pages
You can download any HTML page and open it in the editor. These files cannot be saved back to the server.
To open a page from a Web site:
1Select File > Open From Web. 2Enter the URL for the page or select from your Bookmarks or Favorites list. 3 If the site is accessed via a proxy server, click Proxy and enter the server name and
port number.
4 You can optionally set a time-out limit for the connection.
5 Click OK to open the file as an untitled document.
52 Chapter 4 Managing Files
To copy Web page content do one of the following:
To select a block of text on a Web page and insert it into a document, use
Windows copy and paste commands. Note that page formatting is not preserved.
To copy the code behind a Web page, use the browser’s command to view the
page source code, and then copy and paste the content you want.
Note
Please adhere to any copyright and other restrictions on Web document content.
Chapter 5
Writing Code and Web Content
ColdFusion Studio manages many different Web development tasks, from writing simple HTML pages to designing, testing, and deploying complex, dynamic sites.
This chapter describes basic techniques for creating Web content and application code.
Contents
Inserting Code........................................................................................................... 54
Using Inline Tools to Enter Code .............................................................................57
Using Code Generating Tools................................................................................... 60
Adding Document Content ...................................................................................... 61
Using Keyboard Shortcuts ........................................................................................63
Saving Code Blocks as Snippets............................................................................... 64
Making Web Sites Accessible to Visually Impaired Visitors................................... 66
Tips for Visually Impaired Users .............................................................................. 67
54 Chapter 5 Writing Code and Web Content
Inserting Code
ColdFusion Studio coding tools support a range of writing styles, from typing to point-and-click, and you can set the level of support you want: for repetitive tasks, you can use its productivity tools to enter repeated code blocks and required text; when coding tags that you are not familiar with, you can display pop-up tips and lists of language elements.
Note
Some operations, such as browsing to files in tag editors and creating an image map, refer to the current directory. For information about how ColdFusion Studio determines the current directory with two Files tabs, see “About the Files Tabs” on
page 44.
Inserting tags from the QuickBar
The QuickBar is a customizable development toolbar. When you click a QuickBar toolbutton, it inserts code directly into the document or, for tags that require attributes, opens a tag editor.
In addition to toolbars for product tools and standard Windows commands, you can display toolbars for HTML, CFML, JSP, scripting, and ASP code.
Customizing toolbars
You can customize the QuickBar and toolbars in these ways:.
To do this Do this
Change tab order in QuickBar
Move QuickBar Drag the double lines at the left end of the toolbar Reset QuickBar
configuration
You can customize a toolbar in these ways:
To do this Do this
Display Customize dialog box
Change order of items in toolbar
Add toolbutton In Customize dialog box, Visible Toolbars list, click a toolbar.
Right-click QuickBar; select Organize QuickBar; use arrow buttons to set the tab order
In Customize dialog box, Toolbars tab, click Reset to Defaults. This does not remove toolbar buttons that you have added.
Select Options > Customize.
In Customize dialog box, Visible Toolbars list, click a toolbar. Drag buttons and separators.
Drag button from Toolbuttons list to toolbar.
Inserting Code 55
To do this Do this
Add custom toolbutton
Add separator In Customize dialog box, Visible Toolbars list, click a toolbar.
Remove toolbutton or separator
Add custom toolbar
Delete custom toolbar
Click Add Custom Button. Custom Toolbutton dialog box displays. Select an action;complete entries for action; click OK.
Click Add Separator. Separator is added. Drag separator. In Customize dialog box, Visible Toolbars list, click a toolbar.
Drag item from toolbar to outside of toolbar. In Customize dialog box, click Add Toolbar; enter a name; click
OK. Select new toolbar; add toolbuttons. In Customize dialog box, click Delete Toolbar.
Selecting tags from the Tag Chooser
The Tag Chooser provides access to the tag set in all supported languages. For details, see “About Language Support” on page 84.
To use the Tag Chooser:
1 In the editor, right-click and select Insert Tag.
The left pane in the Tag Chooser displays the supported languages. The right pane displays the tags for the selected language.
2 Do one of the following:
Click a language folder. Its elements display in the right pane.
Expand a language folder. Its elements display in functional categories. Click
a category. Its tags display in the right pane.
3 Click a tag in the right pane.
If you want to view syntax and usage information for the tag, click one of the Help icons below the right pane. The Help pane opens to display tag-specific help.
4 To insert a tag, press Select for the highlighted tag or double-click it.
Tags that are inserted directly into a document are listed with brackets in the right pane, such as when the tag is selected.
5 If an editor opens for the selected tag, complete the entries as needed and click
OK to insert the tag. You can open the Help pane in an editor for syntax information.
You can resize the Tag Chooser and keep it open while you work.
<HTML></HTML>. All other tags have individual editors that open
56 Chapter 5 Writing Code and Web Content
Completing tags with Tag Editors
You can use a Tag Editor to add a lot of content within an existing tag, for example in
body tag.
the
To complete the details for a tag:
1 In the Editor, position the cursor in the tag to complete.
2 Right-click, and select Edit Current Tag from the popup menu. 3 Complete the Tag Editor dialog box.
For help, click the Embedded Help button or see the Tag Definitions documentation, located in the Help References pane.
4Click OK. The Tag Editor closes, adding the attributes and values that you specified to the tag.
Using Inline Tools to Enter Code 57
Using Inline Tools to Enter Code
You have a number of tools to help you easily insert new code and to edit existing code as you type. Each of these tools supports a distinct language element, such as tags, objects, and functions.
You can set the options for these inline tools in the Settings dialog box (F8).
Tag Insight
Tag Insight lets you insert tag names, attributes, and values as you type, after typing a start bracket (<) for a tag.
To enable and configure Tag Insight:
1Open Options > Settings > Editor > Tag Insight and select the Enable tag insight
and Enable tag insight tag List options.
2 Set how many seconds Tag Insight waits before displaying a list of options.
3 To add an item to the drop-down list of options that appears after typing < in the
editor: Click Add, type the item, and click OK.
4 To delete an item from the drop-down list: Click the item in the list and click
Delete. It is immediately deleted from the list.
5Click Apply.
To view the attributes and values for a tag:
1 Position the cursor inside the tag and press F2 to open a Tag Tip. 2 Press the Esc key to close the tip.
To insert a tag with Tag Insight:
1 Type a start bracket (<) to display a drop-down list of tags.
Press the Esc key to close a drop-down list.
2 Scroll down the list, select a tag, and press Enter to insert the tag. 3 Press the spacebar to display a drop-down list of attributes for the tag; then select
an attribute and press Enter.
4 Press the spacebar again to display a drop-down list of known values for the
attribute; then select a value and press Enter.
5 Repeat the last two steps until you have entered every element for the tag.
To edit a tag using Tag Insight, do any of the following:
To add an attribute: Position the cursor to the left of a tag end bracket (>) and
press the spacebar to display a drop-down list of attributes for the tag. Select an attribute and press Enter.
Press the Esc key to close a drop-down list.
58 Chapter 5 Writing Code and Web Content
To change an attribute: Delete the attribute and add a new attribute.
To add a value: Press the spacebar after the attribute to display a drop-down list
of known values for the attribute. Select a value and press Enter.
To change a value: Delete the value and add a new value.
Function Insight
Function Insight lets you insert function argument syntax as you type.
To enable and configure Function Insight:
1In the Options > Settings > Editor > Function Insight pane, select the Enable
function insight option.
2 Set how many seconds Function Insight waits before displaying a list of options. 3 To change the list of available functions, modify the Expression Builder definition
file. The Expression Builder function library determines the entries in the function list. For more information, see “Customizing the Development
Environment” on page 169.
4Click Apply.
To insert arguments using Function Insight:
1 Type a function name followed by a left parenthesis, (, to display a drop-down list
of recognized arguments.
2 Select an argument from the list and press Enter to insert it.
Arguments must be separated by commas. If there is more than one possible argument for a function, a comma is automatically inserted after the argument.
3 To add another argument, press the spacebar after the previous argument and its
comma. Select an argument from the list and press Enter to insert it.
4 Repeat the previous step as needed. 5 To complete the function call, delete the comma after the last argument (if
applicable), and add a closing right parenthesis, ).
Tag Completion
When Tag Completion is turned on, the end tag is automatically inserted after you finish typing the start tag.
You can set options for this feature in the Options > Settings > Editor > Tag Completion pane.
The default tag completion set does not include every container tag necessary for coding in XHTML; for example, it does not include < />.
Using Inline Tools to Enter Code 59
Auto Completion
Auto Completion completes a code block by inserting the appropriate code when you type the opening code fragment (trigger string).
You can set options for this feature in the Options > Settings > Editor > Auto Completion pane.
Only a few strings are listed by default; for example, to insert --> after you type <!-- for a code comment. You can also specify the cursor position after insertion; for example, before --> in the previous example of the code comment. You can insert any user-defined string, even blocks of text or code; however, you might want to use code templates for whole blocks of text and code snippets for whole blocks of code.
Code Templates
A code template provides a shortcut for entering static text blocks. As with Auto Completion, this feature is intended for user-defined strings.
To define a code template:
1Open Options > Settings > Editor > Code Templates.
2 In the Code Templates pane, click Add. 3 In the Add Code Template dialog box, type a keyword, a description of the code
template, and a value to be inserted in place of the keyword. Click OK. For example, you could enter dt4 for the keyword, HTML 4.0 Doctype for the
description, and for the value,
Transitional//EN">
If the value includes a tab, it is inserted as an ASCII #9 character, unless the Options > Settings > Editor > Insert tabs as spaces option is selected.
4 The code template displays in the list. Click Apply to save your changes.
.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
To edit a code template:
1Open Options > Settings > Editor > Code Templates.
2 In the Code Templates pane, click Edit. 3 In the Edit Code Template dialog box, change values as needed and click OK. 4 Click Apply to save your changes.
To insert code template text:
1 Type the keyword. 2 Press Ctrl+J to expand the text. For example, the keyword dt4 expands to
HTML 4.0 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
.
60 Chapter 5 Writing Code and Web Content
Extended and special characters
To enter special characters and Latin-1 extended characters, you can either type the
ASCII code or select the character from the list available in View > Extended and
Special Characters. If you need to change the character to its entity name, select Options > Settings >
Editor > Automatically convert extended characters. This converts characters above ASCII 127 to entity names so that they will be properly rendered in browsers.
Using Code Generating Tools
Following are some tools you can use to speed up your Web development:
Temp la te s ( File > New) are useful for creating many pages with the same standard
content, for example the same header and footer or the same application logic. To use your current document as a template for future documents, select File > Save As Template. Then, to create new files from this template, select File > New and, in the New Document dialog box, select the template from the Custom tab.
Wizards (File > New) generate HTML, DHTML, CFML, Java, and JSP code. The
Wizards for Deployment Scripts and Initial Configuration are in the Custom tab.
The JavaScript Tree provides quick access to an expandable tree of JavaScript
elements, allowing quick insertion of a JavaScript element. There is also a JavaScript wizard available to generate and insert several JavaScript functions.
Both the JavaScript Tree and JavaScript Wizard are in the list of toolbar buttons that can be added to your workspace. For instructions on adding a button to a toolbar, see “Customizing toolbars” on page 32.
TopStyle Lite enables you to design, preview, and reference a CSS file.
If Macromedia UltraDev is installed on your system, you can use it for visual page
editing. It enables you to quickly prototype page layouts, create HTML tables and forms, set font and image formatting, generate DHTML elements, and more.
To open your page in UltraDev, select View > Open in Macromedia UltraDev or click the UltraDev button on the Edit toolbar.
The Image Map Editor enables you to add more than one link to the same Web
image (GIF, JPG). To get started, select Tools > Ne w Ima ge Map from the menu.
Adding Document Content 61
Adding Document Content
The default template contains just the code required for a valid HTML document. This default template is stored as \Wizards\HTML\Default Template.htm below your root directory. You can edit this file and save it to change its content.
To open a new document, do one of the following:
Press Ctrl+N to open the default document template.
Select File > New to select a different template or a wizard.
You can easily add a link from an HTML, CFML, JSP or other HTML embedded document to a URL.
To add a link, do one of the following:
Drag a file from a Files tab to insert a link into the current HTML document, in an
image tag, or in an audio or video clip.
Click the Anchor toolbutton on the Common QuickBar tab to define internal and
external links.
For other supported languages, such as WML and SMIL, use the appropriate link syntax.
To insert a file into a document:
1Select File > Insert File from the menu. 2 Open the drop-down list of supported file types to filter file list. 3 Locate the file and click OK to insert the file contents in the current document.
To convert a text file:
1Select File > Convert Text File and locate a local or remote file with a txt
extension.
2 Click OK to open the file in the editor surrounded by basic HTML tags. 3 Add formatting or link to a style sheet.
To copy text from a browser:
1 To strip the HTML formatting code from copied text, select the Treat HTML
dropped from external application as plain text option in the Options > Settings > Editor pane.
2 Select the text in the browser that you want to copy. 3 Use Windows copy and paste commands to enter the text block in the editor.
62 Chapter 5 Writing Code and Web Content
To add content in a visual WYSIWYG editor:
1Select View > Open in Macromedia UltraDev.
If no UltraDev menu command or button appears, select Options > Settings >
Dreamweaver/UltraDev > Enable Dreamweaver/UltraDev integration.
If the menu command does not work, install UltraDev (it is included in the
product package).
2 Add content in UltraDev.
For specific instructions, see the UltraDev tutorials and online help.
3 When you are done, save your work and close UltraDev. The page displays in Studio again, with the changes you made in UltraDev.
To insert Microsoft Office content, do one of the following:
To convert Office content, such as lists, tables, and worksheet cells, to plain text,
select the content and copy it to the editor.
To insert content with the equivalent HTML formatting, open UltraDev, copy the
content into UltraDev, and save. You can then edit the content visually in UltraDev, or close UltraDev to return to
working directly in the code.
Using Keyboard Shortcuts 63
Using Keyboard Shortcuts
Keyboard shortcuts are active for many file management, editing, and debugging commands.
To see the current keyboard assignments:
1Select Options > Customize from the menu. 2Click the Keyboard Shortcuts tab.
To print the list of shortcut keys:
1In the Options > Customize > Keyboard Shortcuts tab, right-click the list and
select Browse.
2 Use the browser’s print command to print the document. You can change key combinations and assign keys to the commands in the list.
To assign a key combination:
1In the Options > Customize > Keyboard Shortcuts tab, select a command from
the list.
2 Click in the text box beside the Apply button and press the key combination you
want to use. If the key combination is already in use, the command that is currently assigned
to the key combination appears below the text box. If you click Apply, you can no longer use the key combination for that command.
3Click Apply.
The list automatically refreshes and displays the change.
64 Chapter 5 Writing Code and Web Content
Saving Code Blocks as Snippets
With code snippets, you can easily store code blocks and content for reuse. Comment your snippets just as you would any code block.
To create a code snippet:
1 Before adding a snippet, you must create a folder. To do so, click the Snippets tab
in the Resources window, right-click in the Snippets panel, and select Create Folder from the menu.
Tip
You can create additional folders as needed. The default location for snippets is the \UserData\Snippets folder below your root directory.
2 Enter a name for the folder. 3 Right-click in the Snippets pane and select Add Snippet to open the Snippet
dialog box.
4 Enter a name for the snippet in the Description box. Note that snippet names
cannot contain characters that are illegal in file names, such as slashes, special characters, or double quotes.
5 In the Start Text window, type or paste an opening code block. You can set a
default spacing between the blocks by pressing the Enter key at the end of the start text and at the beginning of the end text.
6 In the End Text window, enter a closing code block.
7 Click OK.
Tip
Because snippets can be created as start and end blocks, you can use them to surround other tags and content. This is handy for inserting special formatting, navigation elements, and script blocks. Simply highlight the content you want to surround, then insert the snippet.
To insert a code snippet, do one of the following:
Double-click an entry in the Snippets panel.
Right-click and select Insert into document from the popup menu.
To edit or delete a code snippet:
Right-click the snippet and choose the appropriate command (Edit or Delete)
from the snippets shortcut menus.
To manage code snippets and snippet folders:
Use the snippets shortcut (right-click) menus.
Saving Code Blocks as Snippets 65
Sharing snippets
You can share code snippets with other developers by giving them access to a shared folder on your machine or on another network machine.
To create a shared snippets folder:
1Open Options > Settings > Locations.
2 In the Shared Snippets box, use the Browse button to navigate to the shared
folder location and click OK.
3 In the Snippets panel, right-click and select Create Shared Folder.
The folder button changes color to show that it is shared.
Anyone with access to the shared folder can now add, edit, and delete snippets.
Adding snippet shortcut keys
Open the Options > Customize dialog box and select the Snippet Shortcuts tab to enable a keyboard combination for a snippet. Select a snippet and press keys to enter the combination in the box at the bottom.
If a combination is in use, the current command appears below the shortcut box. To overwrite a combination, click Apply.
66 Chapter 5 Writing Code and Web Content
Making Web Sites Accessible to Visually Impaired Visitors
The W3C Web Accessibility Initiative at http://www.w3.org/WAI/ provides a great deal of practical information about designing applications and interfaces for the broadest range of users. Macromedia supports user accessibility in its product interfaces and is striving to fully implement the WAI recommendations.
Simple steps, such as providing a text alternative for images, graphics, and animations, and using clear descriptive text for page elements and navigation, can make a world of difference to a visually impaired user’s experience of your site. Validation tools are available on the site to check compliance with established standards.
Standards may change more quickly than the product, but you can script the Visual Tools Object Model (VTOM) to extend or manipulate its functionality. For details, please see “Customizing the Development Environment” on page 169 and “Scripting
the Visual Tools Object Model” on page 195. You can also check HomeSite Help site
for free downloads that extend the accessibility capabilities of ColdFusion Studio.
Tips for Visually Impaired Users 67
Tips for Visually Impaired Users
Macromedia is committed to enabling a high level of accessibility in our products. ColdFusion Studio includes support for customizable keyboard shortcuts and browser-based HTML online documentation, including Alt text for all images.
This section offers suggestions for ways to work productively in ColdFusion Studio.
Assigning keyboard shortcuts
Keyboard shortcuts are enabled for many file management, editing, and debugging commands. The shortcut list also contains many commands and language elements that are unassigned.
To open the shortcut key list:
1Select Options > Customize (Shift+F8).
The Customize dialog box appears.
2 Press Ctrl+Tab to switch to the Keyboard Shortcut tab.
3 Press Tab to highlight the first key assignment in the list. 4 Use the arrow keys to scroll the list 5 To open the list in the external browser, press Shift+F10 to open the context
menu, then select the Browse command.
You can change any of the current key combinations and you can also enter new key combinations to unassigned items in the list.
To assign a key combination:
1 In the Customize dialog box, on the Keyboard Shortcut tab, select a command
from the list.
2 Press Tab to place the cursor in the key assignment box and then press the key
combination you want to assign.
3 Select Apply to save the assignment.
If the key combination is already in use, a message box displays. You can then choose to overwrite the current assignment or cancel the dialog and press Shift+Tab to place the cursor in the key assignment box again.
The list automatically refreshes when changes are made.
Creating additional key combinations
The Snippets Shortcuts and Scripts Shortcuts tabs in the Customize dialog box also contain a key assignment box that you can use to enter key combinations for those code components.
68 Chapter 5 Writing Code and Web Content
Using shortcut keys for common tasks
Here are a few handy shortcuts:
Press F11 opens the current document in the default external browser, then use
Alt+Tab to move between the applications.
F9 toggles the Resources window display.
Shift+F9 changes the focus between the Document Window and the Resources
Window.
In the Document Window, use Ctrl+Tab to move between open documents.
In the Resources Window, use Ctrl+Tab to move between Resources tabs.
In the Help tab, use the arrow keys and the plus and minus keys to navigate the
Help tree and press Enter to open a Help topic.
F12 toggles the Edit and Browse modes.
Shift+F12 toggles the Edit and Help modes.
Working with user interface elements
The following list describes some ways to work productively in the user interface.
You can use Windows Explorer instead of the Files tabs for working with the file
system, network drives, and remote servers.
Tag Chooser (Ctrl+E) gives you access to the tag sets of all supported languages.
Selecting a tag from Tag Chooser opens the tag editor or inserts the tag directly if the tag does not have attributes. This is an alternative to using the tag toolbuttons on the QuickBar.
The Results window opens to display output from the Search, Code Validation,
Link Tester, and Project Deployment operations as well as showing Image Thumbnails. You can hide or display the Results window by pressing Ctrl+Shift+L. The Keyboard Shortcuts list contains key combinations to focus the view on the various Results tabs.
Enable the Options > Settings > General > Use standard file dialogs option. It is
off by default. The standard dialogs are accessible by screen readers.
Chapter 6
Editing Pages
A wealth of interface options and tools for updating code and content make editing chores easier.
Contents
Setting Editor Options .............................................................................................. 70
Selecting Code and Text Blocks................................................................................ 72
Saving Text to the Multiple-Entry Clipboard .......................................................... 72
Collapsing Text .......................................................................................................... 73
Editing Referenced Files ........................................................................................... 74
Using Tag Editors....................................................................................................... 76
Navigating a document structure in the Tag Tree................................................... 77
Editing code in the Tag Inspector ............................................................................ 79
Formatting Pages with Cascading Style Sheets....................................................... 81
70 Chapter 6 Editing Pages
Setting Editor Options
The flexible editing environment gives you control of all aspects of this critical feature.
Using the editor toolbar
The column between the Document window and the Resources window contains the Editor toolbar.
These toolbuttons give you quick access to commands for:
Handling documents
Formatting
Switching between open documents
Toggling inline coding tools
Opening the active document in Dreamweaver
Displaying the document gutter for line numbers and bookmarks
®
/UltraDev
Setting Editor Options 71
To set a bookmark at the insertion point, select Edit > Toggle Bookmark. The bookmark symbol appears in the gutter. Bookmarks are not saved when you close the file.
Using the Settings dialog box
Open Options > Settings > Editor to configure the editor display options.
Expand the Editor node to view and set options for these features:
Collapsed text
Auto Completion
Tag Insight
Function Insight
Tag Com p let ion
Color Coding
Code Templates
Auto-Backup
72 Chapter 6 Editing Pages
Selecting Code and Text Blocks
You can use the mouse and standard Windows keyboard commands to highlight sections of a document, or use the following shortcuts to quickly select and edit tag blocks:
To select an entire code block, press Shift+Ctrl and double-click in either the start
or end tag.
To select a range of code and text, click at the start of the selection, then press
Shift and click at the end of the selection.
To select a tag, hold the Ctrl key and double-click .
Saving Text to the Multiple-Entry Clipboard
The multiple-entry clipboard lets you store multiple text blocks in the Clipboard and paste them as needed. To activate this feature, you must perform at least one copy command .
Setting the clip entry limit
By default, the clipboard window stores a maximum of 36 entries. This can be changed in the Options > Settings > Editor pane. When the maximum number of clipboard entries is reached, the next copy operation deletes the oldest clipboard entry and adds the new copied text to the bottom of the clipboard entry window.
The following buttons are available on the Edit toolbar for this feature:
Show Clipboard Displays a drop-down window of copied clip icons. As you
mouse over a clip icon, a hint window displays the first few lines of the clip’s text. To paste the clip into the editor at the current cursor position, click on a an icon .
Paste All Pastes all the current clips into the editor at the current position. Clips
are pasted in the order in which they were copied.
Clear Clipboard Deletes all current clips.
Customizing clipboard commands
You can add the clipboard buttons to custom toolbars using the Options > Customize menu command. The buttons are located in the Edit toolbutton section.
Keyboard shortcuts can be assigned to these features, as well. The shortcut descriptions are Show clipboard, Paste all, and Clear clipboard.
Collapsing Text 73
Collapsing Text
When editing long documents or complex applications, you can hide text and code blocks so that you can focus on just a portion of the content. A customizable marker displays the first few characters of the collapsed selection.
Setting options
To set any of the following collapsing text options, select Options > Settings > Editor > Collapsed Text:
Customize the appearance of the collapsed text marker, including the font,
foreground and background colors, and set the amount of text to display inside the marker. The number of characters actually displayed in the marker might vary if a proportional font is used.
Enable a popup display of the full text when you mouse over a collapsed text
marker. You can set the maximum number of lines to display in the popup box.
Enable the automatic selection of text when a collapsed text section is expanded.
This lets you expand a collapsed region and then easily collapse it again.
Set file save and file open options for the collapsed text.
To collapse text in the current document, do one of the following:
Select text then click one of the collapse buttons (-) which display in the gutter.
Select Collapse selection from the right-click popup menu.
Select Collapse Tag from the right-click menu to collapse the entire contents of
the tag.
Select Collapse All Identical Tags from the right-click menu to collapse all tags
which are the same as the current tag, including nested tags.
Click on the blue plus sign <+> at the top of the Tag Inspector pane to collapse the
text based on the current Tag Inspector outline.
To work with collapsed text:
To expand the text, double-click a collapsed text marker.
To expand all collapsed text, right-click anywhere in a document and select
Expand All from the popup menu.
Tip
You can drag collapsed text just like regular text blocks.
Note
Collapsed text blocks can be nested within each other. When you run a search operation or check spelling, collapsed text expands if a match or misspelling is found within the collapsed section.
74 Chapter 6 Editing Pages
Editing Referenced Files
You can edit image files and included files from ColdFusion Studio.
Editing image files
If Macromedia FireWorks® is installed on your computer, you can open your GIF,
JPG, and PNG image files for editing in FireWorks. You can also preview an images by
viewing its thumbnail.
To display thumbnails in a folder:
1 In the Files 1 or Files 2 tab, select the directory with the images to preview.
2Press Shift+Ctrl+F4. 3 In the Results window, right-click on the Thumbnails tab and select Reset to
current folder. For information about how the current folder is determined between the two files
tabs, see “About the Files Tabs” on page 44.
To edit an image:
1 Select the image to edit. You can do this in three ways:
Right-click an image file in the Project tab or one of the Files tabs, and then
select Edit in Macromedia Fireworks.
In the Results window, on the Thumbnails tab, right-click a thumbnail for an
image and select Edit in Macromedia Fireworks®.
In the editor, right-click an <img> tag and select Edit in Macromedia
Fireworks. The image tag must be complete and the file path and file name for
the
src attribute must refer to an actual file.
2 If the image you selected is in PNG format, skip this step. Otherwise, in the dialog
box that appears, specify whether to open the source PNG file for the image:
If you never create your images in PNG format and export them to GIF or JPG
format, then select Never Use Source PNG in the drop-down box and click No.
The image you selected opens in FireWorks and, when you edit an image in
the future, the image opens in FireWorks without displaying this dialog box.
If you always maintain your images in PNG format and export them to GIF or
JPG format, then select Always Use Source PNG in the drop-down box and
click Yes. Browse to the source PNG file and click Open.
The image you selected opens in FireWorks and, when you edit an image in
the future, you can immediately browse to the source PNG file without seeing
this dialog box again.
Otherwise, select Ask When Launching in the drop-down box. Click No if you
want to open the selected file for editing, or click Yes to browse for and open
the source PNG file for the image.
Editing Referenced Files 75
3 Edit the image in FireWorks. 4 When you are done, save your changes and close FireWorks.
Editing included files
You can edit included files in certain tags.
To open an included file for editing:
1 In the editor, right-click in one of these tags:
<cfinclude>
<cfmodule>
<script>
<jsp:include>
<%@ include>
<jsp:forward>
<vtinclude>
<wizinclude>
<!--#include>
2 Select Edit Include file from the pop-up menu.
The file, src, template, or page that is referenced in the include tag opens in the editor.
Note
The referenced file must have an absolute or relative path; you cannot open an included file from a logical file reference, that is, a virtual mapping on the server.
76 Chapter 6 Editing Pages
Using Tag Editors
Tag Editors are tag-specific dialog boxes that contain the attributes and values of the selected tag. Online help is available in each Tag Editor.
Tag Editors fully support ColdFusion Server 5.
About VTML Tag Editors
You can choose from two different Tag Editors for three tags: Anchor <a>, Body <b>, and Image <img>. The standard Image Tag Editor calculates the height and width of an image for you and provides an image preview. The standard Body Tag Editor has a preview for the colors of the page background, text, and each type of link.
Otherwise, the VTML Tag Editors contain everything in the standard dialogs, plus support for multiple languages, browsers, event code, and coding preferences. For example, VTML Tag Editors detect the language of a document (e.g., XHTML) and insert code in that language. The VTML Anchor Tag Editor also supports multiple protocols and accessibility options not found in the standard Anchor Tag Editor.
For information about VTML, see Customizing the Development Environment.
To use a VTML Tag Editor instead of a standard Tag Editor:
1On the Options > Settings > Markup Languages > HTML/XHTML pane, select the
Anchor - <A>, Body - <BODY>, or Image - <IMG> options as desired.
2Click Apply.
Editing a tag with a Tag Editor
This section describes how to open a Tag Editor and to how to access specific help for completing the Tag Editor dialog box.
To open the editor for a tag, do one of the following:
Right-click in a tag and select Edit Tag.
Position the cursor in a tag and press Ctrl+F4.
Position the cursor in a tag and select Tags > E dit Cur ren t Tag .
To view syntax and usage help for the tag:
Click the Toggle Embedded Help button in the Tag Editor dialog box.
For detailed Tag Editor information, see the Tag Definitions documentation, located in the Help References pane.
Note
If the Tag Editor is labeled with “NOTE: This is a write-only Tag Editor,” then the Tag Editor is only intended for inserting a tag, not for editing the content of the tag.
Navigating a document structure in the Tag Tree 77
Navigating a document structure in the Tag Tree
The Tag Tree is located in the top pane of the Tag Inspector tab of the Resources window. It is helpful for inspecting and navigating a document’s structure. You can easily configure it to display just the tag sets you want.
You can edit all of the code in a document without needing to work directly in the editor, by using the Tag Tree and Tag Inspector together. For information about Tag Inspector, see “Editing code in the Tag Inspector” on page 79.
To use the Tag Tree:
1 Open the drop-down list at the top of the pane to select an outline profile.
For more information, see “About outline profiles” on page 77.
2 Click a tag in the tree to quickly locate it in the document. Press Shift+Ctrl and
double-click to select the entire tag block. If the selected tag supports attributes, they are displayed, with their values, in the
Tag Inspector pane.
3 To update the Tag Tree as you edit the document, click the Refresh button on the
Tag Tre e to o lb a r.
4 To display the contents of the selected tag in a single node on the Tag Tree, click
the Collapse button on the Tag Tree toolbar.
Note
The tag body must be collapsed in the Tag Tree to collapse it in the document.
About outline profiles
Outline profiles let you restrict the Tag Tree display to specific tag sets. Outline profiles are written in the Visual Tools Markup Language (VTML) and are saved in the \Extensions\Outline Profiles folder. They fully support ColdFusion Server 5.
The default set of outline profiles gives you a lot of options for filtering the Tag Tree display, but you can easily customize profiles.
To create or customize an outline profile:
1 In the editor, open an outline profile in \Extensions\Outline Profiles folder and
examine its syntax. They are written in the Visual Tools Markup Language (VTML). The VTML markup identifies the tags that are recognized in the profile.
2 If you are editing an outline profile, make a backup copy of the .vtm file. 3 Edit the outline profile or, to create a new outline profile, save the file with a new
name and then make changes to it.
78 Chapter 6 Editing Pages
Tip
If you prefer to work in a graphical user interface, display the Tag Inspector Resource tab and click the Configure Outline Profiles toolbutton in the top pane. The Outline Profile Editor dialog box appears, in which you can create and edit outline profiles.
Configuring the Tag Tree display
This section describes how to change the list of outline profiles in the Tag Tree, how to import an outline profile (.vtm) file, and how to import an outline profile from a .dtd file.
To modify the list of outline profiles:
1 Click the Configure Outline Profiles button at the top of the Tag Tree pane. 2 In the Outline Profiles dialog box, use the Add and Remove buttons beside the list
of outline profiles to add and remove outline profiles.
3 Under Recognized Tags, use the Add Tag and Remove buttons to edit the tag list
for the selected outline profile.
4 In the Tag Settings pane, you can add a caption and tool button to a tag.
5 Click Done. The outline profiles are updated for the Tag Tree. You can import an outline profile from a Visual Tools Markup Language (VTML) file,
or from a Document Type Definition (using the DTD file extension) from an
SGML-compliant language, such as Extensible Markup Language (XML).
To import an outline profile:
1 Click the Configure Outline Profiles button at the top of the Tag Tree pane to open
the Outline Profiles dialog box.
2 Click the Import button in the Configure Outline Profiles dialog box. 3 Select either a VTML definition file or a DTD file to import.
The Import from a DTD file option parses the selected file and stores the document information in a VTML file in the /Extensions/Outline Profiles folder.
4 Browse to the .vtm or .dtd file that you need to import.
5 Click Next.
The Wizard reports the status of the import process.
6 If the process completes successfully, click Finish.
Editing code in the Tag Inspector 79
To work with imported DTD information:
1 Open the Tag Inspector. 2 Select DTD Elements and Entities from the drop-down list at the top of the Tag
Tre e pane.
3 Open a document that adheres to a DTD that you have imported.
If you have imported multiple DTDs, the correct VTML information file is accessed automatically.
4 Select entities and elements in the Tag Tree to highlight them in the document.
Editing code in the Tag Inspector
The Tag Inspector lets you edit code in a property sheet interface that will be familiar to Visual Basic and Delphi programmers.
You can also edit tag definitions from the Tag Inspector. For details, see “Working
with Tag Definitions” on page 106.
The Tag Inspector fully supports ColdFusion Server 5.
Setting the display
You can select buttons at the top of the Inspector pane to control the way attributes and scripting events are displayed. There are three display options:
Version-specific By language and browser version
Categorized By type and browser version
Alphabetically In ascending or descending alphabetical order, by name
When dealing with cross-browser and language issues, it is helpful to select the appropriate display.
To use the Tag Inspector:
1 Click in a tag, either in the Tag Tree or in the Editor, to see a list of its attributes.
2 Click an attribute name to type a value or to select from a list if the attribute takes
predefined values.
3 Click outside the current field to enter the new value in your code. Every tag that ColdFusion Studio installs includes a definition file, written in VTML,
that specifies the valid attributes for that tag and the content and formatting of the tag’s editor.
80 Chapter 6 Editing Pages
Creating and editing event handler script blocks
Adding and modifying script blocks for events such as onclick is easy from the Tag Inspector. You can edit an event if it is supported as an attribute of the selected tag or edit the event directly.
To add an event handler script block:
1 Select a tag in the Tag Tree to display a list of supported attributes and events in
the Tag Inspector pane.
2 You can either click the event in the Attributes list or in the Events list. 3 Open the drop-down list in the values column and select a script language for the
event handler.
4 In the Specify Event Handler Name dialog box, you can select the default entry or
type a new name, and then click OK. The event syntax is added to the tag and a script block is created in the
section of the document.
5 Complete the script block for the handler. To locate an event script block in your document, double-click its name in the Tag
Inspector pane or right-click the tag and select the navigate command.
HEAD
Formatting Pages with Cascading Style Sheets 81
Formatting Pages with Cascading Style Sheets
Cascading Style Sheets (CSS) can be added at any point in a site’s development process, but ideally the design specification for a site will be implemented via style sheets, eliminating the need to code and maintain formatting for individual tags. More significantly, CSS lets developers and content providers focus on organizational and navigation issues by separating formatting from content. As a site’s structure evolves, styles can be globally changed, added, and deleted, giving developers greater freedom and time to achieve design goals.
A site can be retrofitted with CSS, although this requires deleting tag-based formatting code.
About the Style Editor
TopStyle Lite provides an integrated user interface for designing and deploying Cascading Style Sheets (CSS). TopStyle makes it easy to define, preview, and apply styles to Web content. This illustration shows the main components of the TopStyle user interface.
The TopStyle online help system includes a tutorial, a CSS reference, and procedures for using its features. The help system also includes information on how to upgrade to TopStyle Pro.
82 Chapter 6 Editing Pages
Loading...