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
TheDarkIn1978
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook
Accepted Solution

Window Group ID Parameter For Dialog Show() Method?

[ Edited ]

can someone explain to me what is suppose to be the parameter of the show() method of a dialog?

 

the examples in the documentation are not clear:

 

Note: In the last line of the code snippet above, the window group ID is passed into the show method:

.show(IowWindow.getAirWindow().group);

This ensures that the dialog will be modal for only this application. In other words, the application can still be minimized when this dialog is active.

 

i understand what the purpose is, but what is a window group ID?


PlayBook Applications:
Drop Swatch
New Developer
bretonneTX
Posts: 2
Registered: ‎12-15-2010
My Device: Not Specified

Re: Window Group ID Parameter For Dialog Show() Method?

Same question here.  Where do I get the IowWindow?

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

Re: Window Group ID Parameter For Dialog Show() Method?

It's not a required parameter.  Leave it off for now.  I am certain it is needed for some more advance use of the dialog sub-system that has yet to be documented or disclosed.

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Window Group ID Parameter For Dialog Show() Method?

I don't recall where I read about it, but you can get IowWindow with

import qnx.display.IowWindow;

 

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Developer
Omnipitence
Posts: 22
Registered: ‎01-21-2011
My Device: Playbook

Re: Window Group ID Parameter For Dialog Show() Method?

If I add the IowWindow to my MXML Mobile application i get a runtime error.

 

VerifyError: Error #1079: Native methods are not allowed in loaded code.

 

at flash.display::MovieClip/nextFrame()

at mx.managers::smileyfrustrated:ystemManager/deferredNextFrame()[E:\dev\hero_private_beta\frameworks\projects\framework\src\mx\managers\SystemManager.as:280]

at mx.managers::smileyfrustrated:ystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\hero_private_beta\frameworks\projects\framework\src\mx\managers\SystemManager.as:2524]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at mx.preloaders::smileytongue:reloader/timerHandler()[E:\dev\hero_private_beta\frameworks\projects\framework\src\mx\preloaders\Preloader.as:512]

at flash.utils::Timer/_timerDispatch()

at flash.utils::Timer/tick()

 

 

Does anyone know why  i would get this?

Regards

 

Anthony

 

Playbook Apps

Liquid-Photo
Follow us on Twitter @LiquidPhotoApp
P.S. Did you know you can take a screen shot by holding down the up/down volume buttons on the PlayBook! Great for recording errors.
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Window Group ID Parameter For Dialog Show() Method?

@peter's right about the import.

 

@Omnipitence Are you testing it in the simulator or as a desktop app? If in the simulator then I'm not sure, if a desktop app then run on the simulator.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Regular Contributor
Danel
Posts: 54
Registered: ‎03-16-2011
My Device: PlayBook

Re: Window Group ID Parameter For Dialog Show() Method?

[ Edited ]

fix for VerifyError: Error #1079: Native methods are not allowed in loaded code.

 

 

 

as in Flash Pro, you need to import entire air folder from sdk. problem is that this entire folder content of swc's will be Merged into code.

so to fix the error with VerifyError: Error #1079: Native methods are not allowed in loaded code.

you need to link to each swc file and qnx-air.swc needs to be external.

 

Heres a screenshot, this swc is only one linked as external, all others are Merged into code

 

Skärmavbild 2011-03-26 kl. 16.11.44.png

 

and to show alertdialog i use this:

 

 

var alert:AlertDialog = 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();

 

var alert:AlertDialog = 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();

 

notice show() has nothing in it, just call for show() and you will be good

Developer
TheDarkIn1978
Posts: 409
Registered: ‎12-10-2010
My Device: PlayBook

Re: Window Group ID Parameter For Dialog Show() Method?

[ Edited ]

[DELETE MESSAGE]


PlayBook Applications:
Drop Swatch
Contributor
surajkushwaha
Posts: 25
Registered: ‎01-18-2012
My Device: Blackberry curve

Re: Window Group ID Parameter For Dialog Show() Method?

Hello friends i still get the problem when i click on button and push the dialog then it gives the exception PPSChannel not found please help me

thanks in advance

suraj

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

Re: Window Group ID Parameter For Dialog Show() Method?

On the device or as an AIR app?