
188 Use the Code Editor
Set up your project
Before you begin this lesson, perform the following tasks:
■ If you haven’t already done so, create the Lessons project in Flex Builder. For more
information, see “Create the Lessons project” on page 101.
■ Ensure that the automatic build option is enabled in Flex Builder. This option is enabled
by default in the standalone configuration of Flex Builder but not in the plug-in
configuration. To enable it, select Project > Build Automatically.
Create an MXML file to demonstrate
code editing features
To demonstrate the features of the code editor, begin by creating an MXML application file in
the Lessons project, which you’ll use to add sample code.
1. With your Lessons project selected in the Navigator view, select File > New > MXML
Application and create an application file called CodeEditor.mxml.
2. By default, when you create an MXML application file, the editor is displayed in Source
mode. If Design mode is displayed instead, select Source mode to continue.
Use Content Assist
If you’ve walked through any of the other Flex Builder tutorials or if you’ve entered any code
in the code editor, you will have noticed that Flex Builder automatically provides code
hinting, which helps you to complete your code as you enter it.
1. With the CodeEditor.mxml file open in the editor, begin to add a Panel component by
entering an opening tag:
<
NOTE
For the purpose of these short tutorials, several application files are used in a single
Flex Builder project. However, it’s good practice to have only one MXML application
file per project.
Comentarios a estos manuales