Creating PlayBook apps with Flex and QNX UI Components

I got some requests about how to use both Flex and QNX UI components for building PlayBook apps. In this post I will show you how to do it.

Here are the basic steps.

1. Create a Flex mobile project. Make sure that you enabled the project for BlackBerry Tablet OS development.

2. Edit project properties to include the QNX libraries to the project build path (right-click on the project name > Properties). Select BlackBerry Tablet OS section and then check the Include BlackBerry Tablet OS libraries in build path.

Once you apply this changes your project should be ready for QNX components. Of course you have to add QNX components using ActionScript code; you can’t use QNX components as MXML tags.

You have to remember that the QNX UI components don’t inherit or extend the Flex base UI components. And because of this you can’t add them, for example, directly to a View Flex class using view.addElement(QNX-UI-component); instead you can use an instance of Flex UIComponent as wrapper. Here is code snippet that illustrates this technique:

Here is screencast that walks you through the setup and shows a sample app:

Download

You can download the project code from here.

Show Comments

Hide Comments

Comments are closed.