Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

New Developer
Posts: 11
Registered: ‎01-18-2011
My Device: Not Specified
Accepted Solution

Simulator issue: Off-centered white screen instead of application

[ Edited ]



I'm new to the BlackBerry community, BlackBerry development, et al. Today I downloaded the SDK to test the TabletOS 0.9.2 simulator, but I have already spent several hours trying to get anything to run without luck.


The simulator installed with no apparent issues. I've been reading the forums today and I have had none of the problems that others have mentioned, such as a screen freezes or problems during boot up.


I am using a trial version of VMWare Fusion 3.1.2 under Mac OS X 10.6.6.


I don't have Adobe Flash Builder, so I'm using TextWrangler. I wrote an applescript that, upon saving my actionscript file, invokes a perl script (I know, sounds redundant but it works) and does the compilation for me as posted by Taylor Byrnes (amxmlc, blackberry-airpackager). I am able to talk to the simulator as my compilation output doesn't show any errors (as far as I know), but my application pops up in the simulator without the icon I provided.


When the application launches, all I get is an off-centered white screen with no content on it.


I also compiled the HelloWorld example provided. What I got was another application in the simulator with the default icon that did the exact same thing: Show an off-centered white screen. Every time I recompile either script with minor changes, the icons in the simulator flash for a millisecond, and then I get the same off-centered white screen.


Has anyone experienced anything like that? Any clues?


There's obviously something I must be doing wrong. I can post my command-line arguments and the script if that helps. I have tested my swf file in the Flash Player app and it shows up fine. All I have there is a red Sprite with a TextField on top.


Sorry for the verbosity and thanks for any help you can provide.



Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Simulator issue: Off-centered white screen instead of application

[ Edited ]

Are there are any spaces in folder names anywhere in the path to your project on your computer?  If so try to migrate your development to a folder that does not have any spaces in any folder names anywhere in its path.  This may not be the cause of the problem but in any case you should eliminate it as a possibility.  Windows users are discouraged from using the typical C:\Documents and Settings directory for Playbook project dirs.


The other thing that has tripped up some folks using command line builds is how picky the tools are.  In your commandline, try using the -C option, and making sure it is between -package <package name>.bar and -installApp:


I.e. instead of:



blackberry-airpackager -package HelloWorld.bar -installApp -launchApp HelloWorld-app.xml HelloWorld.swf [ICON FILE NAME] -device [PLAYBOOK IP ADDRESS] -password [SIMULATOR PASSWORD]


do this:



blackberry-airpackager -package HelloWorld.bar -C [YOUR PROJECT WORKING DIR} -installApp -launchApp HelloWorld-app.xml HelloWorld.swf [ICON FILE NAME] -device [PLAYBOOK IP ADDRESS] -password [SIMULATOR PASSWORD]



In the 0.9.1 SDK the airpackager was fussy about the order of commandline options.  I am not on 0.9.2 yet but did not see anything in the release notes about them having fixed this.


Edit:  Note; I never got an off center white screen w/any of my commandline compile adventures, but before I had the "correct" commandline incantation, I did get apps that showed a splash screen and then just went away.  I'm on Windows (XP SP3) btw.


New Developer
Posts: 11
Registered: ‎01-18-2011
My Device: Not Specified

Re: Simulator issue: Off-centered white screen instead of application

[ Edited ]



Thanks for your time and your clear suggestions.


It finally worked, thanks to your suggestion to use the -c option. I still struggled for a good hour and a half, until I tried the -c option PLUS absolute paths. It didn't have anything to do with whitespace (in my case), as I didn't have any in my path and additionally it was double-quoted.


It was actually a mistake that I left the -c option there. I had already given up, returned everything back to normal (and forgot to erase the -c option), and started writing you a reply, when I did a final try and my application showed up with my own icon.


To verify, I eliminated the -c option and left the absolute paths. I got the previous issue again. Put the -c option and absolute paths back on, and it worked like a charm again. Like magic!



"/Developer/SDKs/BlackBerryTabletOS0.9.2.sdk/bin/blackberry-airpackager" -package "/blackberry-test/AIRHelloWorld.bar" -installApp -launchApp "/blackberry-test/AIRHelloWorld-app.xml" "/blackberry-test/AIRHelloWorld.swf" "/blackberry-test/blackberry-tablet-icon.png" ...


Tried with no luck:

/Developer/SDKs/BlackBerryTabletOS0.9.2.sdk/bin/blackberry-airpackager -package AIRHelloWorld.bar -c /blackberry-test -installApp -launchApp AIRHelloWorld-app.xml AIRHelloWorld.swf blackberry-tablet-icon.png ...


Final, working command:

"/Developer/SDKs/BlackBerryTabletOS0.9.2.sdk/bin/blackberry-airpackager" -package  "/blackberry-test/AIRHelloWorld.bar" -c "/blackberry-test" -installApp -launchApp "/blackberry-test/AIRHelloWorld-app.xml" "/blackberry-test/AIRHelloWorld.swf" "/blackberry-test/blackberry-tablet-icon.png" ...

Note: I prefer double quotes to avoid any whitespace issues. Since the command is automatically generated, I don't have to tinker it in case one day I have whitespace in my path.



Thanks a lot!