You should be able to either set mouseEnabled/mouseChildren to false on the renderer, or call preventDefault() on the mouseDown event.
I'll give that a go.
What I did was prevent the changing event from propagating on the list itself which didn't work as expected.
I'll write back.
A few questions though:
1. I am setting that in the overriden commitProperties(). Is there the place for this?
2. This is faster than overriding the drawBackground method, right?
3. I only need to set that, I don't have to listen for the mouse down event and prevent it as well?
4. Regarding the second option, listening for MOUSE_DOWN and preventing it: Can I not just remove the listener from where it was inherited or is it private? I could not find it. Or if I add a new listener, should I try to override the one that already exists if it isn't private?
5. Why just MOUSE_DOWN and no Touch events?
Thanks and sorry for the overload.
1 person found this helpful
1. commitProperties seems fine
2. I assume it would be faster since you avoid unnecessary drawBackground calls. You might want to test to make sure.
3. Correct, if you can't click on something it won't be able to fire a mouseDown event
4. The mouseDown listener is added to the renderer in List.dataGroup_rendererAddHandler. You could tweak it there, but that would require a subclass of List. I typically find it easier to do from within the renderer via one of the two approaches I mentioned above especially when that changes based on the data in the renderer.
5. The Flex SDK currently deals exclusively with mouse events. See the "Mouse vs. Touch Events" section of this spec for more information: http://opensource.adobe.com/wiki/display/flexsdk/Mobile+List%2C+Scroller+and+Touch
Thank you very much.