Log in / Register
Home arrow Computer Science arrow Learn BlackBerry 10 App Development
< Prev   CONTENTS   Next >

Launch Configurations

The purpose of this section is to explain what's happening behind the scenes when you use the BlackBerry Toolbar, which essentially creates launch configurations for you. A launch configuration is purely an Eclipse concept and not at all specific to Momentics; it associates a build result with

a target. You must create it in order to run your application on a simulator or a device. There are two kinds of launch configurations that you can create: the Run Configuration and the Debug Configuration. In this section, I will show you how to create a Debug Configuration for the Simulator target. (The steps for creating a Run Configuration are identical to a Debug Configuration. A Run Configuration will simply launch your application on the target, whereas a Debug Configuration will launch it under Momentics' debugger control.)

1. Select Run ➤ Debug Configurations… from the Momentics main menu to display the Debug Configurations Dialog (see Figure 1-17).

Figure 1-17. Debug Configurations

2. Select BlackBerry C/C++ Application from the list and press the New button in the upper-left corner of the dialog box. The settings for the new launch configuration will be displayed (see Figure 1-18).

Figure 1-18. Simulator launch configuration

3. Make sure that the build configuration is Simulator Debug and the selected target is Neutrino/x86, which corresponds to the simulator. Press Apply and then press Debug (note that the simulator name might be different, depending on how you have configured it).

4. HelloCascades will now be launched in debug mode on the simulator. The Momentics IDE will also switch from the QML Editing perspective to the Debug perspective, and the program execution will stop at the beginning of the main function (see Figure 1-19) .

Figure 1-19. Debug perspective

5. Press the Resume button to continue the program execution. The Hello Cascades application should now be running on the simulator (see Figure 1-20).

Figure 1-20. Hello Cascades on the simulator

6. Try moving the slider and notice how the scene changes from day to night.

To create a debug Launch configuration for the device, you basically need to repeat the same steps, with the following differences:

1. Set the active build configuration to Device-Debug.

2. Build the HelloCascades project.

3. Create a new launch configuration (see Figure 1-17 and Figure 1-18).

4. Give a name to your launch configuration (for example, HelloCascades Device-Debug).

5. Select the device target.

6. Press Debug.

Once again, launch configurations can be completely ignored by using the BlackBerry Toolbar, but it is always a good idea to have a basic understanding of their functionality.

Found a mistake? Please highlight the word and press Shift + Enter  
< Prev   CONTENTS   Next >
Business & Finance
Computer Science
Language & Literature
Political science