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
Miaomiao
Posts: 26
Registered: ‎05-22-2011
My Carrier: Rogers

How to detect multiple click event from the qnx List

There's ListEvent.ITEM_CLICKED event for clicking on the cell. In most the cases, it's good enough to handle the list select event. But if I have two buttons in every cell, I need a better way to detect the click event.

 

Here's the issues:

1. ICellRenderer doesn't have the reference to the list it belongs to, so I cannot send message to the list directly when the click event happens

2. The List doesn't seem to have the references to all the cells(it only knows lastVisibleCell and firstVisibleCell), so it cannot add event listens to every cell for my custom event from the cell.

 

Anyone have any suggeston how to do this?

 

Thanks

Please use plain text.
Developer
shawnblais
Posts: 410
Registered: ‎10-25-2010

Re: How to detect multiple click event from the qnx List

- On Mouse down each renderer processes the target, decides it's "clickAction" and stores that as a public var.

- When your list is clicked, look at the the renderer to see what it's clickAction is.

 

Please use plain text.
Contributor
Miaomiao
Posts: 26
Registered: ‎05-22-2011
My Carrier: Rogers

Re: How to detect multiple click event from the qnx List

Is it possible that the list click event comes earlier than the events in cell renderer?

Please use plain text.
Contributor
Miaomiao
Posts: 26
Registered: ‎05-22-2011
My Carrier: Rogers

Re: How to detect multiple click event from the qnx List

I set the event priority to int.MAX, but the list event still came first...

Please use plain text.
Contributor
Miaomiao
Posts: 26
Registered: ‎05-22-2011
My Carrier: Rogers

Re: How to detect multiple click event from the qnx List

Sorry shawnblais, I didn't see you said mouse down instead of mouse click, that works. Thanks a lot

 

Please use plain text.