Managing projects and devices

When you start the Momentics IDE for BlackBerry for the first time, the Workspace Launcher dialog box prompts you for a location to store your workspace. All of your projects are stored in this folder.

After you create or import a new project, you are prompted to open the project in the QML Editing perspective. The QML Editing perspective contains a number of views designed to assist with QML development, such as the Components view and the QML Properties view.

For more information about the views that you can use in the Momentics IDE, see The QML Editing perspective.

Screen showing the QML Editing perspective in the Momentics IDE.

Create a new project

The first step in developing an application is creating a project for all of your source code and assets. To create a new Cascades project, you can use the New BlackBerry Project wizard. The wizard has four tabs that you need to complete: Project Type, Templates, Basic Settings, and API Level.

To start the wizard, click File > New > BlackBerry Project.

Project Type

The Project Type tab on the New BlackBerry Project wizard.

The Project Type tab allows you to select whether you want to create an Application (Cascades or Core Native), a Library (Static or Shared) or a Native Extension (Adobe AIR or BlackBerry WebWorks).

To continue, make sure that Cascades is selected and click Next.

Templates

The Templates tab in the New BlackBerry Project wizard.

The Templates tab provides project templates that you can use to create your project. Each template is a unique starting point that you can use for building your app. You should take some time to explore the different layouts and navigation models, to see what kind of UI works best for your application.

To continue, select a template from the list and click Next.

Basic Settings

The Basic Settings tab in the New BlackBerry Project wizard.

The Basic Settings tab allows you to provide a name and location for your project, and to add the project to an existing working set if required.

To continue, provide a name for your project in the Project Name field and click Next.

API Level

The API Level tab in the New BlackBerry Project wizard.

The API Level tab allows you to select the API level that you want to build your application with. Each API level corresponds to a version of the BlackBerry 10 OS (for example, 10.0, 10.1, and 10.2) and supports a specific set of devices. For more information about API levels, see API levels.

To continue, select the API level that you want your application to support and click Finish.

Import an existing project

Sample apps and tutorial code are packaged as projects that are compatible with the Momentics IDE for BlackBerry. You can import Cascades sample apps directly from the IDE.

To import a sample app from the IDE:

  1. Click Sample apps on the Welcome page.
  2. Click a sample app to read more about it.
  3. Click Download and import on the sample of your choice. The project folder for the sample will be added to the Active Project drop-down list and the Project Explorer view.

You can also import existing project files by performing the following actions:

  1. In the Momentics IDE, on the File menu, click Import.
  2. Expand General and select Existing Projects into Workspace. Click Next.
  3. Select the Select root directory option and click Browse.
  4. Browse to the location of the project(s) that you want to import, and click OK.
  5. In the Projects section, select the project(s) that you want to import, and click Finish. You'll see the imported project(s) in the Project Explorer view, and you can explore the source code.

Explore project files

Every project that you create or import into the Momentics IDE contains the following files and folders:

  • Screen showing the Project explorer in the Momentics IDE. src: This folder contains the C++ source and header files for your application.
  • arm: This folder contains binaries used for running the application on a device.
  • assets: This folder contains the assets for your application, including images, sounds, video, and QML files.
  • translations: This folder contains translation files containing localized text that the application uses to support different locales.
  • x86: This folder contains binaries used for running the application on the simulator.
  • bar-descriptor.xml: This file contains all the configuration settings that your application requires. For more details about various configuration settings, see The bar-descriptor.xml file.
  • config.pri: This autogenerated file contains build instructions for precompiled headers.
  • Makefile: This file contains build settings for your application. When you use the Momentics IDE to build and package your application, you don't typically have to modify any of these instructions.
  • precompiled.h: This file contains a list of headers that you want your application to precompile.
  • .pro: This file contains project settings for your application. It also lists the libraries that your application links against. For more information about linking to libraries, see Linking against libraries.

Manage devices

When you set up your development environment, one of the steps is to pair a device or simulator so that you can run your applications on it. If you need to set up an additional target, you can do so anytime without going through the wizard again.

Screen showing the Manage Devices option in the Active Device drop-down list.

To create a new target:

  1. Select Manage Devices in the Active Device drop-down list.
  2. Set up a device or simulator:
    • To set up a new device, click the Devices tab, and then click Set Up New BlackBerry 10 Device.
    • To set up a new simulator, click the Simulators tab, and then click Download New Simulator.

If you're using a device, you must turn on Development Mode on the device before you can connect to it through the IDE. The simulator is in Development Mode by default.

Last modified: 2014-01-23

comments powered by Disqus