05-17-2012 10:47 AM
Trying to get a very simple AIR app working with the BB10 10.0.4 AIR SDK and I get:
ReferenceError: Error #1065: Variable qnx.fuse.ui.skins:
kinAssets is not defined.
at qnx.fuse.ui.theme::ThemeWhite/createCSS()[E:\hudso
at qnx.fuse.ui.theme::ThemeWhite()[E:\hudson\workspac
at qnx.fuse.ui.theme::ThemeGlobals$/getTheme()[E:\hud
at qnx.fuse.ui.theme::ThemeGlobals$/http://www.qnx.com/2009/qnx/internal::getCSS()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\
at qnx.fuse.ui.core::UIComponent/get css()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\sr
at qnx.fuse.ui.core::UIComponent/init()[E:\hudson\wor
at qnx.fuse.ui.text::TextBase/init()[E:\hudson\worksp
at qnx.fuse.ui.text::Label/init()[E:\hudson\workspace
at qnx.fuse.ui.core::UIComponent()[E:\hudson\workspac
at qnx.fuse.ui.text::TextBase()[E:\hudson\workspace\B
at qnx.fuse.ui.text::Label()[E:\hudson\workspace\BB10
at bb1()[U:\workspace460\bb1\src\bb1.as:12]
It occurs when creating a label:
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import qnx.fuse.ui.text.Label;
import qnx.fuse.ui.theme.ThemeGlobals;
public class bb1 extends Sprite
{
private var label :Label;// = new Label();
////////////////////////////////////////////////// /////////////////////////
public function bb1()
{
super();
// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
ThemeGlobals.currentTheme = ThemeGlobals.BLACK;
this.label = new Label();
this.label.text = 'Hello World';
this.label.setActualSize( 200, 50 );
this.addChild( this.label );
}
}
The exception is thrown when trying to run it as an AIR app on the desktop.
Solved! Go to Solution.
05-17-2012 01:55 PM
This code runs fine for me on the BlackBerry 10 Dev Alpha Simulator. Also opens fine when I click the .swf in my bin directory. My version is slightly different.
package
{
import flash.display.Sprite;
import qnx.fuse.ui.text.Label;
import qnx.fuse.ui.theme.ThemeGlobals;
[SWF(height="1280", width="768", frameRate="30", backgroundColor="#777777")]
public class LabelTest extends Sprite
{
public var myLabel:Label;
public function LabelTest()
{
ThemeGlobals.currentTheme = ThemeGlobals.BLACK;
myLabel = new Label();
myLabel.text = 'Hello World';
myLabel.setActualSize( 200, 50 );
addChild( this.myLabel );
}
}
}
Using FDT5 free version.
Regards,
Dustin
05-17-2012 02:43 PM
05-17-2012 02:56 PM
I switched over to Flash Builder and I'm getting the same error as you. Seems to work fine in FDT. I will create a bug and follow up with the SDK team.
Has anyone else run into this issue?
05-17-2012 03:14 PM
Thanks. Let me (us) know when it is resolved. Nothing can be developed in Flash Builder at this point with the new SDK.
05-17-2012 03:15 PM
Here is the bug for tracking - https://www.blackberry.com/jira/browse/BBTEN-16
05-17-2012 03:30 PM
05-17-2012 03:51 PM
For BB10.04, skins reside in a native extension, so you have to add it to your project properties.
Unfortunately, FlashBuilder requires two steps to do it:
The project has to have the QNXSkins.ane added to it (Preferences->Build Path->Native Extensions) and marked to be included to the BAR file as well (Preferences->ActionScript Build Packaging->BlackBerry->Native Extensions). For the latter, you might have to expand the window to actually see the checkbox for the ANE.
The native extensions are under frameworks/libs/qnx/ane.
Cheers
05-17-2012 03:57 PM - edited 05-17-2012 04:09 PM
Doh! Was reminded about ANE"s that need to be added.
- Open up your project properties and browse the the Native Extensions tab in the ActionScript Build Path option.
- Click add folder and then add the C:\Program Files\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\libs
Make sure it's checked off to be included in your bar as well.
Paulo beat me to it. Thanks Paulo +1
05-17-2012 04:14 PM
Also - case in point why the workflow in FDT is much better than in Flash Builder.
I recommend it ![]()