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
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

DeleteAction on contextMeny is dispatched twice

Hi guys!

 

I hadn't realized before, one of my users did. In last 3.1.0 and 3.1.1 sdk's, when using a contextMenu with a DeleteAction, when you select this deleteAction the select event is dispatched twice, generating some errors in my apps.

I'm pretty sure this didn't happen on 3.0.0 sdk.

Regular actions (not delete ones) work fine, being dispatched just once.

 

Any idea on how to solve?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Developer
Posts: 227
Registered: ‎01-17-2012
My Device: PB
My Carrier: ATT

Re: DeleteAction on contextMeny is dispatched twice

I simply disable it on the first invocation, then check status on the second.  My contextOpening handler re-enables if needed.

 

Regards,

Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: DeleteAction on contextMeny is dispatched twice

Yes of course, I had already thought something like this as a workarround, but I have to apply it on so many places and three different apps!!!

 

 

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: DeleteAction on contextMeny is dispatched twice

I've confirmed that this is a bug in 3.1.1, 3.1.0.  I can get it to do the same in 3.0.  I dont recall this being a problem before, so I am wondering if it is something else.  It does seem to be only the delete action, since other context actions seem to only fire once.

 

 

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

Re: DeleteAction on contextMeny is dispatched twice

I've made the AIR team aware of this, so hopefully we will get some input on this.

Best to mitigate this on your own until we get some guidance on this.
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: DeleteAction on contextMeny is dispatched twice

Thankyou man!

In my case, mitigation means a lot of work! 3 different apps with 3 to 15 different places to fix Smiley Sad

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: DeleteAction on contextMeny is dispatched twice

I agree. I have it all over the place too.
One option is not to use the "standard" delete and just move it to the end of the other actions in your list. We know those fire once.
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: DeleteAction on contextMeny is dispatched twice

I've created a PR and escalated. You can track it here - https://www.blackberry.com/jira/browse/BBTEN-991

 

Cheers,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: DeleteAction on contextMeny is dispatched twice

Thanks. Those impacted should vote for this ticket.