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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Contributor
stephen_turner
Posts: 12
Registered: ‎01-05-2011
My Carrier: ROGERS
Accepted Solution

BB10 AIR qnx.dialog box or any Alert Message??

Hey Guys,

 

Im having the hardest time with something extremely simple...dialog boxes! Theres something Im not getting and I hope someone out here knows what Im doing wrong!!!! Ive searched the internet, api docs, forums and still nothings working! The below code is from the BlackBerry AIR resource site and does not display anything when I reference it from a view. From the playbook tablet development the old mx.Alert dialog does not show up either?

 

Any ideas? Thanks ahead of time!

 

 

 

     private function showAlertDialog():void
     {
        alert = new AlertDialog();
        alert.title = "Warning";
        alert.message = "This operation may harm your computer. Do you still want to proceed?";
        alert.addButton("OK");
        alert.addButton("CANCEL");
        alert.dialogSize= DialogSize.SIZE_MEDIUM;
        alert.addEventListener(Event.SELECT, alertButtonClicked); 
        alert.show(IowWindow.getAirWindow().group);
     }
     
     private function alertButtonClicked(event:Event):void
     {
          trace("Button Clicked Index: " + event.target.selectedIndex);
          trace("Button properties Object"+event.target.getItemAt(event.target.selectedIndex);
     }
Please use plain text.
Contributor
stephen_turner
Posts: 12
Registered: ‎01-05-2011
My Carrier: ROGERS

Re: BB10 AIR qnx.dialog box or any Alert Message??

Does anybody have working dialog boxes in their air applications?

Please use plain text.
Contributor
stephen_turner
Posts: 12
Registered: ‎01-05-2011
My Carrier: ROGERS

Re: BB10 AIR qnx.dialog box or any Alert Message??

Solved It. Awsome Thanks!

Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

Re: BB10 AIR qnx.dialog box or any Alert Message??

What was the resolution?
Please use plain text.
Contributor
stephen_turner
Posts: 12
Registered: ‎01-05-2011
My Carrier: ROGERS

Re: BB10 AIR qnx.dialog box or any Alert Message??

Hey jtegen,  Instead of fighting with the current components to get working I just created my own dialog custom component.

Please use plain text.
Contributor
hiennt
Posts: 11
Registered: ‎04-24-2010
My Carrier: T-Mobite

Re: BB10 AIR qnx.dialog box or any Alert Message??

Stupid RIM i have to say. From AIR 1.0 till 3.0, I never make app work straighway after update SDK.

 

Anyway here is solution for this AlertDialog

 

import qnx.fuse.ui.dialog.AlertDialog;

 

var winner11:AlertDialog;

winner11 = new AlertDialog();

winner11.title = "Warning";

winner11.message = message;

winner11.addButton("OK");

winner11.show();

winner11.addEventListener(Event.SELECT, alertButtonClicked);

return winner11;

 

Please use plain text.
Developer
agaripian
Posts: 119
Registered: ‎12-02-2010
My Carrier: T

Re: BB10 AIR qnx.dialog box or any Alert Message??

This still is not working for me anything else I need to do for the Dialog Box to appear? 

---------------------------------------------------------------------
Developer of Stocks for Blackberry 10
Please use plain text.
Trusted Contributor
mdd
Posts: 197
Registered: ‎01-17-2012
My Carrier: ATT

Re: BB10 AIR qnx.dialog box or any Alert Message??

If you are running on PB OS 2.1, dialogs don't work:

 

ReferenceError: Error #1056: Cannot create property deviceOrientation on qnx.display.IowWindow.
	at IowWindowImpl/set deviceOrientation()[E:\hudson\workspace\BB10_0_09-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\window\IowWindowImpl.as:365]
	at QNXWindow/set deviceOrientation()[E:\hudson\workspace\BB10_0_09-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\window\QNXWindow.as:260]
	at qnx.fuse.ui.managers::WindowManager/_onShow()[E:\hudson\workspace\BB10_0_09-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\managers\WindowManager.as:439]
	at qnx.fuse.ui.managers::WindowManager/show()[E:\hudson\workspace\BB10_0_09-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\managers\WindowManager.as:413]
	at qnx.fuse.ui.dialog::DialogBase/show()[E:\hudson\workspace\BB10_0_09-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\dialog\DialogBase.as:587]

 If you are running on Dev Alpha simulator, they work (to a degree).

Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

Re: BB10 AIR qnx.dialog box or any Alert Message??

BB10 SDK is not suppose to run on the PlayBook. That will come later in the spring.
Please use plain text.
Trusted Contributor
mdd
Posts: 197
Registered: ‎01-17-2012
My Carrier: ATT

Re: BB10 AIR qnx.dialog box or any Alert Message??

exactly, but (as discussed in another thread) it does (mostly) work.

 

Regards,

Please use plain text.