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 enable the project for BlackBerry Tablet OS development.
2. Edit project properties to include the QNX libraries in the project build path (right-click on the project name > Properties). Select BlackBerry Tablet OS section and then select the Include BlackBerry Tablet OS Libraries in Build Path option.
Once you apply these 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 a wrapper. Here is a code snippet that illustrates this technique:
Here is screencast that walks you through the setup and shows a sample app:
You can download the project code from here.