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
Levion
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520
My Carrier: Software Developer
Accepted Solution

Class not found when using QNXStageWebView

Hi, I try to use the "QNXStageWebView" class in FlashDevelop. But I always get a "class not found" error. In the simulator my application stops immedialtly. I added the "qnx-air.swc" to the project. Are there any additional libs to use?

 

 

package 
{
	import flash.display.Sprite;
	import qnx.media.QNXStageWebView;

	
	// The following metadata specifies the size and properties of the canvas that
	// this application should occupy on the BlackBerry PlayBook screen.
	[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]
	
	public class Main extends Sprite 
	{
		private var webView:QNXStageWebView;
		
		public function Main():void 
		{
			webView = new QNXStageWebView();
			webView.loadURL("http://www.google.de");
		}
		
	}
	
}

 

 

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: Class not found when using QNXStageWebView

Just compile against the whole BB SDK under /sdks folder of the FB.  And if for some reason that you cannot, there are 2 QNX SWC files, so try the other one.

Please use plain text.
Developer
Levion
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520
My Carrier: Software Developer

Re: Class not found when using QNXStageWebView

I added all swc-files in ...\SDK\blackberry-tablet-sdk-0.9.1\frameworks\libs recursive

 

It doesn't work :smileysad:

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: Class not found when using QNXStageWebView

What is your development environment?  FB4? Just add the SDK to the IDE and select it as the library for the project.

 

You should be using SDK 0.9.2.

 

When you say "it doesn't work", what does'nt work?  Compile, runtime, display?

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: Class not found when using QNXStageWebView

There is a lot more in getting the webview to be shown and work.  Have you searched the threads on the trial and tribulations of other developers?

Please use plain text.
Developer
Levion
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520
My Carrier: Software Developer

Re: Class not found when using QNXStageWebView

Hi, I use "FlashDeveop" and I think that's the problem. It's not that easy like in FlashBuilder 4. It doesn't work means that there is no change to the described behaviour.

 

I think the message "Class qnx.media::QNXStageWebView could not be found" is normal because it's alsways a problem to run the QNX specific stuff outside the simulator. But the crash in the simulator is curious.

Please use plain text.
Developer
Levion
Posts: 137
Registered: ‎12-22-2010
My Device: Curve 8520
My Carrier: Software Developer

Re: Class not found when using QNXStageWebView

I found an example here:

 

http://www.petefreitag.com/item/770.cfm

 

seems it's soooo easy .... that drives my crazy :smileywink:

 

Maybe I give it a try with FB4. I think there is a trial.

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: Class not found when using QNXStageWebView

[ Edited ]

If you have the environment setup properly, it should compile fine (accept that the web view gets odd compile errors every other time).  Runtime (outside of the simulator), you will probably get a PPS exception.  There are several threads in the forum that covers the development and depolyoment of the QNX web view.  Suggest that you review those to see if that helps.

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: Class not found when using QNXStageWebView

That is a nice tutorial.

Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Class not found when using QNXStageWebView

@Levion - ah yes, the WebView bogus errors!  this is a known issue and there are 2 back to back errors that will show up inside Burrito, requiring you to save your project 3 times in order to deploy it. (and or see any true errors you have)

 

This only occurs in projects that import the QNXStageWebView...

 

Errors that occur in order. (just add then delete a space to re-save)

 

1.) An internal build error has occurred. Right-click for more information.

2.)1131: Classes must not be nested

 

Once the errors clear, if you save again, the errors will re-appear and you'll have to save 3 more times.

 

Needless to say, this is **MAJORLY** frustrating!!!!

 

I'm not sure if the issue is with Burritto, or the SDK or what, but many of us would really love a fix! ;-)

 


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.