12-20-2010 05:08 PM
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!
Solved! Go to Solution.
12-20-2010 05:17 PM
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:
hope that helps. good luck!
12-20-2010 05:21 PM
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?
12-20-2010 05:30 PM
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!
12-20-2010 05:40 PM
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!
12-20-2010 05:46 PM - edited 12-20-2010 06:02 PM
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.