Welcome!

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

Reply
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon
Accepted Solution

BB10: Error 1065 SkinAssets is not defined

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::smileyfrustrated:kinAssets is not defined.
at qnx.fuse.ui.theme::ThemeWhite/createCSS()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\theme\ThemeWhite.as:25]
at qnx.fuse.ui.theme::ThemeWhite()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\theme\ThemeWhite.as:20]
at qnx.fuse.ui.theme::ThemeGlobals$/getTheme()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\theme\ThemeGlobals.as:246]
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\src\qnx\fuse\ui\theme\ThemeGlobals.as:235]
at qnx.fuse.ui.core::UIComponent/get css()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\core\UIComponent.as:910]
at qnx.fuse.ui.core::UIComponent/init()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\core\UIComponent.as:212]
at qnx.fuse.ui.text::TextBase/init()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\text\TextBase.as:666]
at qnx.fuse.ui.text::Label/init()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\text\Label.as:115]
at qnx.fuse.ui.core::UIComponent()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\core\UIComponent.as:180]
at qnx.fuse.ui.text::TextBase()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\text\TextBase.as:468]
at qnx.fuse.ui.text::Label()[E:\hudson\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\text\Label.as:107]
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.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10: Error 1065 SkinAssets is not defined

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.

 

hello.png

 

Regards,
Dustin 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Error 1065 SkinAssets is not defined

I am trying to confirm that the SDK was installed correctly. Any suggestions of what I can check or do? blackberry-tablet-sdk-3.0.0 is in the RIM folder under "Program Files". Which is also defined under SDK for Adobe AIR under IDE PReferences.
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10: Error 1065 SkinAssets is not defined

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?

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Error 1065 SkinAssets is not defined

Thanks.  Let me (us) know when it is resolved.  Nothing can be developed in Flash Builder at this point with the new SDK.

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10: Error 1065 SkinAssets is not defined

Here is the bug for tracking - https://www.blackberry.com/jira/browse/BBTEN-16

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Error 1065 SkinAssets is not defined

Please use plain text.
BlackBerry Development Advisor
pgarcia
Posts: 52
Registered: ‎04-01-2011
My Device: Torch, Playbook
My Carrier: Rogers

Re: BB10: Error 1065 SkinAssets is not defined

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

 

 

 

 

---
Paulo Garcia
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10: Error 1065 SkinAssets is not defined

[ Edited ]

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\qnx\ane folder.

 

anes.jpg

 

Make sure it's checked off to be included in your bar as well.

 

build.jpg

 

Paulo beat me to it. Thanks Paulo +1

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10: Error 1065 SkinAssets is not defined

Also - case in point why the workflow in FDT is much better than in Flash Builder.

 

I recommend it :smileyhappy:

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.