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
analytik
Posts: 38
Registered: ‎08-02-2012
My Device: Q10

ActionBar.backButton triggers error "One of the parameters is invalid."

[ Edited ]

Hi. After upgrading to SDK 3.1.0, I get the following error on what worked - I just create an ActionBar and add a back button.

var ab:ActionBar = new ActionBar();
ab.setPosition(0,1140);
ab.backButton = new qnx.fuse.ui.core.Action('Back');
ab.addEventListener(qnx.fuse.ui.events.ActionEvent.ACTION_SELECTED, goBackToGame);
this.addChild(ab);

 

ArgumentError: Error #2004: One of the parameters is invalid.
	at flash.display::Graphics/drawRect()
	at ActionButton/updateDisplayList()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\actionbar\ActionButton.as:154]
	at qnx.fuse.ui.core::UIComponent/validateDisplayList()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\core\UIComponent.as:1056]
	at qnx.fuse.ui.managers::InvalidationManager/validateDisplayList()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\managers\InvalidationManager.as:126]
	at qnx.fuse.ui.managers::InvalidationManager/doInvalidation()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\managers\InvalidationManager.as:230]
	at qnx.fuse.ui.managers::InvalidationManager/enterFrame()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\managers\InvalidationManager.as:194]

I've readded all 4 ANEs and 4 .swcs from SDK 3.1.0, so I'm not sure what I'm doing wrong. Any tips? Thanks.

 

EDIT: This happens only in the Flash Builder's own AIR simulator, NOT when I debug/run it on the device (back button on actionbar works perfectly there!). Haven't tried with a VMWare machine.

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

Re: ActionBar.backButton triggers error "One of the parameters is invalid."

Desktop wont load the BB ANEs, so that is why you get the error.
Contributor
analytik
Posts: 38
Registered: ‎08-02-2012
My Device: Q10

Re: ActionBar.backButton triggers error "One of the parameters is invalid."

[ Edited ]

That doesn't make much sense, as it worked with the previous SDK.

 

EDIT: I mean, I understand what you're saying and agree; it just seems pointless, as everything worked before. Replacing the default Back icon with a custom icon doesn't stop the Error from happening. Debugging in Simulator is much faster than on the device or VM.

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

Re: ActionBar.backButton triggers error "One of the parameters is invalid."

I'm still playing catchup and just got back from Europe yesterday. Still on my list to download 10.1, so maybe I am not seeing this yet.