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
germama
Posts: 22
Registered: ‎12-17-2010
My Device: Not Specified
Accepted Solution

List Class and DoubleClick

Hello List,

 

when playing around with the List class, I saw there is an public property "doubleClickEnabled" which is not documented in the API docs. Does anybody know hot to handle a double-click on list items in a List object?

 

List only knows ListEvent.ITEM_CLICKED, I can't find a double-click event ...

 

Thanks in advance!

Marco

 

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List Class and DoubleClick

hey germama,

 

although the doubleClickEnabled property shows up, its not utilized by the List object. it shows up only because it is a part of the InteractiveObject class which the list is related to by extension. classes that extend other class dont use every propery or method from its inhertited class. so although it is a part of it, the list itself does not utitlize that property. you can read more about doubleClickEnabled here:

 

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/InteractiveObject.h...

 

hope that helps. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Contributor
germama
Posts: 22
Registered: ‎12-17-2010
My Device: Not Specified

Re: List Class and DoubleClick

Thanks for the quick reply!

 

For my understanding ... there is no "context sensitive" menu click event, like e.g. on android and also no double click? I guess many applications have such kind of use cases to actually "do" something with list items. Do you know a way around?

 

Thanks!

Marco

 

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List Class and DoubleClick

hey,

 

if you want more specific funcitons based on the way a user clicks it may (now i really emphasize may because i have tried it out) be possible via a cell renderer. a cell renderer applies a "skin" to each cell in your list. so in theory it can also be used to set a mouse event for each individual cell. but we have seen that you cant apply a mouse event to all objects in AS3 because they need to to actually be an "Intereactive Object" that dispatch events like Mouse Click. So you can try and see your results.

 

as for Cell Renderers, its a shady area. if you do a search in the forums you will get results of our attempts (i say attempts because how to modify a cell renderer class is undocumented so we were going by trial and error) at creating our own custom cell renderer class. once you get the cell renderer up and going theoretically you can use the this.addEventListener(MouseEvent.DOUBLE_CLICK, myFunction) to add a mouse event listener to it. but again im not entirely sure if this works. but its worth a shot. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Contributor
germama
Posts: 22
Registered: ‎12-17-2010
My Device: Not Specified

Re: List Class and DoubleClick

Thats a good idea :- I will try it and post the solution here ...

Maybe this is something RIM could keep in mind when implementing further SDK features.

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List Class and DoubleClick

not a bad idea! keep me posted on your findings. ill do the same once i get around to it... got me curious hah good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: List Class and DoubleClick

[ Edited ]

By the way, you might want to be careful about using too many mouse-specific events.  Never having used a multitouch device I'm not sure quite what they are capable of, but "double-tapping" is, in my experience (based on Android use) a rare thing to see in an app controlled by the finger.

Direct activation of something via tapping should be the primary interaction, with "long-press" (press and hold the item) being an alternate that is generally treated the same as right-clicking (but see caution below about this non-obvious mechanism).

There's also press-and-tap (uses two fingers, one held down while the other taps), along with swiping (e.g. drag list item to one side, assuming a vertically oriented list), etc.

You should also keep in mind that users may not realize they should (or even can) double-click on things when not using a mouse.  See, for example, User testing reveals iPad usability flaws, for one take on it, noting in particular the critical issue of "discoverability" in the UI.  (Edit: Note the link to the Jakob Nielsen study behind it, which has more meat.)

 

Fortunately, in the PlayBook (and iPad) we have ample screen real estate in which to put hints, tooltips, etc, for new users.  I can imagine conventions developing for certain apps where there are less discoverable mechanisms such as double-tapping, where hints are displayed to new users for a while, until the application sees them using certain features enough to stop showing the hints.


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!
Please use plain text.