MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guide de l'utilisateur Page 196

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 256
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 195
196 Debug an Application
Set up your project
Before you begin this lesson, perform the following tasks:
If you havent 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 the basic features of debugging your applications in Flex Builder, 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 Debugging.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.
3. Designate the Debugging.mxml file as the default application file by right-clicking
(Control-click on Macintosh) the file in the navigator view and selecting Application
Management > Set As Default Application from the context menu.
4. In the MXML editor's Source mode, enter the following code after the opening
<mx:Application> tag:
<mx:Label x="10" y="40" text="Enter amount"/>
<mx:TextInput id="txt_A" x="95" y="40" width="100"/>
<mx:ComboBox x="210" y="40" id="cb_amount" dataProvider="{Currency}"
prompt="Select currency..." width="150"/>
<mx:TextInput id="txt_B" x="95" y="80" width="100" editable="false"/>
<mx:Text id="txt_currency" width="100" x="210" y="80"/>
<mx:Button id="btn_calculate" click="calculate();" x="95" y="140"
label="Calculate" width="100"/>
5.
Save the file.
NOTE
For the purpose of these short tutorials, several application files are used in a single
Flex Builder project. However, its good practice to have only one MXML application
file per project.
Vue de la page 195
1 2 ... 191 192 193 194 195 196 197 198 199 200 201 ... 255 256

Commentaires sur ces manuels

Pas de commentaire