12-07-2010 12:27 AM
In order to be able to deploy to many platforms, I'm trying to build my application in a "headless" fashion; the main app class changes based on the OS I'm deploying it to, but the underlying library remains the same. I have my library classes in their own Flex Library Project, and the Playbook specific classes in their own project. Currently, I can't get any QNX classes to show up inside my library project, but they show up just fine in my main app project. I have both the main app and the library projects using the Playbook 0.9.1 SDK.
Is there something special I need to do for a library project to bring in QNX classes, or am I missing something obvious? Thanks!
Solved! Go to Solution.
12-07-2010 01:59 AM - edited 12-07-2010 02:02 AM
funny, I was just about to post on that.
But my case may be the same. Like you, I cannot access the QNX library. I just downloaded Flex Burrito, and for some reason... I don't have access to the qnx library?
import qnx. (command + space) = nothing....
It was working with Blackberry Lib 0.9.0 and I had access to the lib, but not 0.9.1? Surely I'm missing something...
I also noticed that I don't need to have the Emulator, it just runs locally... in a special version of AIR I guess?
12-07-2010 02:20 AM
@turbidity: I need you to right click on your project and go to properites. Navigate to ActionScript Build Packaging and Click on BlackBerry Tablet. What do you see checked off? Make sure both checkboxes are checked off:
Next go to the ActionScript Build Path and what do you see there? You should get a list of libraries that FB4 uses to build and compile your program. Here's what you should see:
let me know if your settings are any different.
@underlabs: from the sound of it the SDK wasnt properly installed. Does it happen to all your apps you try to create? what steps did you follow to install the SDK? When creating a new ActionScript Mobile Project do you get the option to choose BlackBerry Tablet as a target platform?
in regards to having the Desktop AIR run your applications it is a standalone testing environment that does the basic AIR runtime functionality but it does not have the native playbook runtime. This means that of you try using any sort of dialog service or try to use a QNX component the formatting will be off and you may get errors. You are limited. Try redoing the SDK installation this time choosing the Flex Hero SDK instead of the AIR SDK when asked to choose in Step 3 i believe. (both options work for some people but i went with the Flex Hero and it installed properly.)
Good luck guys!
12-07-2010 02:32 AM - edited 12-07-2010 02:48 AM
I see... I was very pleased to flip flop between Actionscript and MXML when I created my app as a Flex Mobile Project.
It seems you can only access the qnx with a purely Actionscript Mobile Project.
I even tried manually adding the swcs of qnx in the Flex Mobile Project... but while compiling, I get an error:
VerifyError: Error #1079: Native methods are not allowed in loaded code.
12-07-2010 02:42 AM
yeah unfortunately that was one of the caveats of using burrito. in order to directly access qnx ui components and such you have to use an actionscript mobile project. however there is a middle ground. if you do decide to use the Flex Mobile Project you can do so. If you go to the post below, renaun created an extension of the button class from the QNX library that can be used in an MXML format project. Its pretty cool actually. Gotta love those work arounds. Here's the link:
12-07-2010 12:21 PM
Hi JRab, thanks for the advice. It looks like I have quite the different setup. I'm using FB 4.0.1 Standalone. For my Flex Library Project, here are the options I have in the Properties panel. I don't have the QNX SWC in there, and I don't have the options for the ActionScript Build Packaging:
For my main app project, because it is not a Flex Library Project, I have a different set of options, but interestingly the QNX SWC is not present in its Build Path either. I also don't have the access to the ActionScript Build Packaging options either.
The only difference I saw between the main app project and the library projects' build paths was that the SDK was merged into the main app code, and that the library's wasn't. I tried switching that so the library merged the SDK code into it, but that didn't make any difference. I still can't import any qnx package classes without getting compile errors and it won't autocomplete the import.
Any ideas? Thanks!
12-08-2010 01:38 AM
the screen shots i showed you were from my flash builder 4.5 burrito application. so the menus will look a little different. this is the menu from my flash builder 4.0.1 application:
and with the libraries expanded:
from the looks of things your SDK did not install or isnt being read properly. did you follow and do everything according to the getting started for windows guide? good luck!
12-16-2010 05:35 PM
Aha! Thanks for the screenshot. That gave me the clue to figure out what the issue was. I noticed I also didn't have all the AIR classes you have. I went in and clicked the Include AIR Libraries under the Flex Library Compiler options in Properties and all the AIR libraries, including the qnx-air SWC showed up. Now I can bring in QNX classes into my Library project. I guess the QNX stuff gets lumped in with AIR and is not just part of the SDK by itself.
And I apologize for the long response time. I've been offline and then tied up with business. Thanks!
12-16-2010 05:42 PM