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
Contributor
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

[ Edited ]

Hey!

I just discovered the LoginDialog class so I thought I'd give it a spin... But couldn't get it to work!

 

Here's a demo class:

 

package {
	import flash.display.Sprite;
	
	import qnx.dialog.AlertDialog;
	import qnx.dialog.BaseDialog;
	import qnx.dialog.DialogSize;
	import qnx.dialog.LoginDialog;
	
	public class DialogTests extends Sprite {
		public function DialogTests() {
			var myLoginDialog:LoginDialog = new LoginDialog();
			myLoginDialog.addButton("OK");
			myLoginDialog.addButton("Cancel");
			myLoginDialog.title = "Welcome to my application";
			myLoginDialog.message = "Please enter your username and password:";
			myLoginDialog.show();
		}
	}
}

This throws that error:

 

VerifyError: Error #1014: Class qnx.pps::PPSChannel could not be found.

 

I also tested some basic code with AlertDialog and BaseDialog; and the result is the same: nasty VerifyError! And it doesn't work in the simulator either...

 

Anyone with a working example class?

Any tip?

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

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

Is the Sprite you are adding the dialog in the Sprite of the application or a Sprite that gets added to your base application?

 

Have you just try creating the dialog in the base application Sprite to verify that this is working for you?  I've used the dialogs a few times in my base application Sprite and other UIComponent "views" and had no trouble.

 

That fact that I dont see the stage being made visible in your constructor makes me think you're using this Sprite on some other fashion (plus the sprite does not have the SWF parameters along the top of it).

Contributor
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

Well, the Sprite class you see here (DialogTests) is the default application class. I've updated it like that but it doesn't change anything:

 

 

(...)
[SWF(width="1024", height="600", backgroundColor="#ffffff", frameRate="30")]
public class DialogTests extends Sprite {
	public function DialogTests() {
		stage.nativeWindow.visible = true;
		(...)

 

 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

i just copied pasted and ran the program without any problems... it pops up a login dialog box with no errors. the problem might be with what program ur compiling with... do other programs you have created compile without a problem? and if you are using flash builder are you updated to version 4.0.1?

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
Contributor
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

Wow, that's weird.

Yes all my other projects work fine (and they break as soon as I add any dialog) and my editor is Flash Builder 4.0.1!

 

Thanks for helping out.

Do you know where I should report this bug/behaviour?

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

hey quentin,

 

im looking more into this but from what it looks like is your QNX SDK isn't properly installed... if you navigate in the panel all the way to the left (Package Explorer) go to ur current project and expand the BlackBerry Tablet OS SDK item and it should open up a large list of .swc files. go to the qnx-air.swc item and expand that... there should be a package called PPS there. according to your error message there is a problem with that package (PPSChannel.abc). So i would go about the whole installation procedure for the Tablet SDK from the beginning. good luck!

 

ps im not sure where to report bugs except maybe these forums.

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
Contributor
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

Apparently everything is where it should be...

 

Capture.PNG

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

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

Does the application run if you comment out the dialog part?

 

I call the AlertDialog without any issues:

 

var alert : AlertDialog = new AlertDialog();
alert.title = 'About';
alert.dialogSize = DialogSize.SIZE_SMALL;
alert.message = 'Hello World';
alert.addButton( 'OK' );
alert.show();

 

Try adding a LabelButton in your constructor with a mouse click event to a method that then shows your dialog.  Maybe it does not like to show a dialog in the constructor of the application because everything has not been initiated and added to the stage yet.

Contributor
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

Nope, nothing works...

As soon as I call the show method it breaks. I think I'll wait for the next SDK release, too bad!

 

I get real nasty stuff...

Have a look at that (this happens when I try to instanciate a PPSChannel object):

 

 

typecheck DialogTests()
  outer-scope = [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ DialogTests$]
                       [DialogTests[O] *[A] *[A]] {} ()
  0:debugfile "C:\Users\Quentin\Desktop\My Dropbox\dev\_playbook\DialogTests\src;;DialogTests.as"
                       [DialogTests[O] *[A] *[A]] {} ()
  2:debugline 15
                       [DialogTests[O] *[A] *[A]] {} ()
  4:getlocal0
                       [DialogTests[O] *[A] *[A]] {} (DialogTests[O])
  5:pushscope
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} ()
  6:debugline 15
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} ()
  8:getlocal0
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} (DialogTests[O])
  9:constructsuper 0
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} ()
  11:debug
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} ()
  16:debug
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} ()
  21:debugline 17
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} ()
  23:findpropstrict qnx.pps::PPSChannel
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} (Object[A])
  25:constructprop 1 0
                       [DialogTests[O] *[A] *[A]] {DialogTests[O]} (*[A])
  28:coerce qnx.pps::PPSChannel
[SWF] DialogTests.swf - 343,164 bytes after decompression

How lovely is that? Smiley Happy

 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: LoginDialog, AlertDialog and all BaseDialog classes throw VerifyError

even after a full removal and re-installation it still doesn't work? wow thats a bummer. try this. right click on your project and go to properties. after that go to Flex Build Path and that should bring you to all ur available libraries for this project. What do you see? make sure that the blackbery tablet os sdk is the first on the list. if not move it to the first position and re-build your project. see if that does that trick!

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