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
ml4d
Posts: 10
Registered: ‎12-07-2010
My Device: Not Specified

Strange Dialog Behaviour

[ Edited ]

I can't seem to set the "hideOnButtonClick" property on any dialog, they also appear not to be firing their "

DialogEvent.DIALOG_BUTTON_CLICKED" events.

 

Before I submit these issues as bugs I wanted to see if anyone else has been experiencing a similar problem and has a fix/work around.

 

 

*UPDATE*

 

http://www.kitchenarcade.com/DialogTest.zip

 

Included the project .zip export. Still no joy with either events or the "hideOnButtonClick" setter. If someone could give the project a whirl see if it works for you. If not I'll file them as bugs.

 

Regular Contributor
anthonyq
Posts: 73
Registered: ‎12-09-2010
My Device: Blackberry Curve 8530

Re: Strange Dialog Behaviour

It's happening to me too, won't fire on the button clicked event.

 

Also when yo do an alert.addEventListener( ..there is also no option for DialogEvent.

 

Not sure how to work around this, other than creating your own sort of dialog? I'm still getting used to AS/AIR though so I'm not really sure how to go about doing that.

 

 

Anthony
http://www.anthonyquarella.com
Accepted Apps: UpToDateTV
Developer
miroslav
Posts: 29
Registered: ‎11-14-2010
My Device: Playbook

Re: Strange Dialog Behaviour

I think that hideOnButtonClick is definitely a bug.

 

For the dialog event, I'm not sure where it's supposed to be used but if you look at documentation you will see that Event.SELECT is used to detect the button click on the dialogs.

 

Try this in your initDialog():

 

 

dialog.addEventListener(Event.SELECT, dialogEventHandler);

 

 

And this is a handler:

 

 

private function dialogEventHandler(event:Event):void
{
      trace("button index", dialog.selectedIndex);
}

 

 

Regular Contributor
anthonyq
Posts: 73
Registered: ‎12-09-2010
My Device: Blackberry Curve 8530

Re: Strange Dialog Behaviour

That solution works wonderfully, miroslav!!  Thanks a bunch!

Anthony
http://www.anthonyquarella.com
Accepted Apps: UpToDateTV