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
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Possible Bug: Repeate Re-Building Needed

[ Edited ]

Hey,

 

So tonight I've been running some code and have come to the need of constant "cleaning" or manual rebuilding of my project. Here's the code in particular:

 

 

package 
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;
	import flash.text.TextField;
	
	import qnx.media.QNXStageWebView;
	import qnx.ui.buttons.LabelButton;
	import qnx.ui.text.TextInput;
	
	// 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 PlaybookTest extends Sprite
	{
		private var addressInput:TextInput;
		private var webView:QNXStageWebView;
		
		public function PlaybookTest()
		{
			addressInput = new TextInput();
			addressInput.x = 10;
			addressInput.y = 10;
			addressInput.enabled = true;
			addressInput.text = "http://www.google.com/";
			
			var goButton:LabelButton = new LabelButton();
			goButton.label = "Go";
			goButton.x = addressInput.width + 10;
			goButton.y = addressInput.y;
			goButton.addEventListener(MouseEvent.CLICK, go);
			
			
			var closeButton:LabelButton = new LabelButton();
			closeButton.label = "Close";		
			closeButton.addEventListener(MouseEvent.CLICK, closeWindow);
			closeButton.x = (stage.stageWidth - closeButton.width) - 10;
			closeButton.y = 10;
			
			webView = new QNXStageWebView(); 
			webView.stage= stage;
			webView.autoFit=true;
			webView.viewPort = new Rectangle(10,100,stage.stageWidth,stage.stageHeight-100);
			webView.enableCookies = true; 
			webView.enableJavascript = true; 
			webView.enableScrolling = true; 
			webView.loadURL("http://google.com");
			
			addChild(addressInput);
			
			addChild(goButton);
			addChild(closeButton);
			
			stage.nativeWindow.visible = true;
		}
		
		private function closeWindow(event:MouseEvent):void{
			stage.nativeWindow.close();
		}
		
		private function go(event:MouseEvent):void {
			webView.loadURL(addressInput.text);
		}
	}
}

 If i change a single thing or put in a break somewhere and hit save it re-builds as it is supposed to but then spits out these weird errors in the project. Here is a screen shot:

 

Screen shot 2010-12-02 at 3.32.54 AM.png

 

 

now if i save it again without inserting or removing anything new. Im just going to remove a semi colon and add it again and resave the project:

 

Screen shot 2010-12-02 at 3.34.34 AM.png

 

no errors. im not going crazy right? this is using flash builder 4.0.1. Same thing happened earlier on the Burrio release but i brushed it off as a Burrito related error maybe a bug or something.

 

Update: ok so i ran the same project but this time using the older blackberry sdk and this does not happen at all. it cant be repeated. So my guess is somethings going on with the newer SDK thats causing it. So i ask bug or no bug? Someone please try it and see what happens.

 

Steps to reproduce:

 

File > New Flex Project

Use the new BB Sdk

 

Paste the code. Debug if necessary and then go back to the code edit a character or something and save it and see if this happens. Thanks!

 

Update #2: I've also noticed when you run the above code using the newer BB SDK the text input doesnt function using the onscreen keyboard or laptop keyboard. But if i run it using the older SDK it works perfectly. Can someone test that out too? thanks!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
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: Possible Bug: Repeate Re-Building Needed

I'll try the code later today, unless someone else gets to it first.

 

I had lots of issues with 0.9.1 with Hero to a point that I was just going to use 0.9.0, but then I tried installing just the latest AIR SDK with 0.9.1 and the problems went away.  I may run into other problems yet uncovered, but at least my current apps compile and run in both environments.

 

It would be easier if the installer of BB SDK just included the proper/needed Adobe AIR/Flex/Flash SDK components instead of everyone having a mixed bag of libraries that may or may not be compatible with each other that have to be merged at installation (just a suggestion).

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Possible Bug: Repeate Re-Building Needed

Agreed. I had to do an install of the BB SDK twice to get it right (at least I think I got it right.) When it asked to choose either the Adobe AIR SDK OR the Flex Hero SDK I was a little confused. Initially chose Adobe AIR SDK but then ran into a few problems and so I went with the Hero SDK the second time around and that fixed the compile errors. I read somewhere Adobe installs the AIR SDK into the 4.5.0 directory or something.
J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
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: Possible Bug: Repeate Re-Building Needed

[ Edited ]

Funny.  I had the opposite problem.  Promblems with HERO+0.9.1 (granted it may have not been the latest version of Hero), but no problems with AIR_SDK+0.9.1.  Now, all I have done so far is to recompile my applications, run as AIR and run in simulator.  I have not done any more testing beyond that.

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: Possible Bug: Repeate Re-Building Needed

I copied your code.  Compiles fine.  If I remove a semi-colon from one of the statements, I get the 95 errors for simple things (booleans, arrays, etc).  I think it is just the compiler not understanding the conditions of each statement.  However, in another application, I removed a semi-colon and I did not get the errors.

 

Playing with your code more.  I get the 95 errors every other time, regardless of what I do.  Just adding another comment bar, gets the errors.

 

I'll blame the QNXStageWebView since everything else is pretty standard and I had no other diffilculties with.

 

Good luck.

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Possible Bug: Repeate Re-Building Needed

hey john,

 

yeah i noticed before if i strip down the code of the same project .as file to only say textinput the mysterious compile time errors disappear and dont show up. but once i start adding more code to it (whatever was on there after qnxstagewebview initiations) the errors start coming back. weird thing is though it doesnt happen with the older sdk.

 

thanks for trying it out though! :smileyhappy:

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Contributor
peacemoon
Posts: 32
Registered: ‎12-10-2010
My Device: Not Specified

Re: Possible Bug: Repeate Re-Building Needed

i can confirm this bug. I have the same behaviour with QNXStageWebView and the same errors

Please use plain text.
New Contributor
darrell_davis
Posts: 4
Registered: ‎12-09-2010
My Device: Not Specified

Re: Possible Bug: Repeate Re-Building Needed

As mentioned by others, I also get the same problem once I added QNXStageWebView to my project.

Please use plain text.
New Contributor
electricthought
Posts: 5
Registered: ‎12-15-2010
My Device: Not Specified

Re: Possible Bug: Repeate Re-Building Needed

me too.  it seems that webview is the problem.

Please use plain text.
Developer
tensioncore
Posts: 323
Registered: ‎12-13-2010
My Device: Bold 9900/Z10 Special Edition
My Carrier: Rogers

Re: Possible Bug: Repeate Re-Building Needed

I took the code, compiled and ran/debugged, tested in all my playbook environments and I couldn't get it to fail. I'm using Flash Builder Burrito, Windows Server 2008 x64, and VMware Playbook Virtual Machine. ....here's a screen: http://www.nickdodd.com/Images/playbooktest.png
CEO/Lead Developer - Tensioncore™ Design Studios
http://tncr.ws/ - ShortenThis!™ for Blackberry Playbook | ShortenThis!™ for BlackBerry® 10
The Periodical Toe A highly informative Table of Elements
DrawThis! A fun drawing app for the BlackBerry® PlayBook™!
http://www.tensioncore.com/ - Tensioncore™ Web Hosting
Please use plain text.