05-12-2011 10:09 AM
I'm studying the QNX components in order to check/improve performances of my Spark app. (This is for the background).
So I'm trying to use the List scrollToIndex method in order to put in view a new item added to the list:
But this doesn't work for now.... I have no animation, and the new item is not in view.
(I check item status using: myList.getIsCellVisibleAtIndex(newIndex) )
Anybody would know how to use this method in order to have a smotth animation of the list ?
Solved! Go to Solution.
05-12-2011 10:17 AM
05-12-2011 10:51 AM
Thank you for the answer jtegen,
my sample code would not be optimal for a bug report, because I use a QNX list inside a Flex Spark project (not pure as3)...
So QNX list animation is not working... too bad. I guess we have to use custom classes again.
(Note that it was the same problem with Spark List: I had to customize the class to have a smooth animation.)
New question: is there a way to retrieve the scroll position of a QNX list ? What is the "scrolling" object ? (for Spark list it's the dataGroup)
05-12-2011 12:06 PM
05-12-2011 02:50 PM
Ah yes, I found your ScrollPane post about it.
So you managed to have the List manually scrolled to where you want this way ?
For now I try to understand how works List.__scrollMgr. It looks like this is what handle the scrolling.
But I got it null when I use it directly ...
05-13-2011 07:58 AM
I made a lot of tests with the List for now:
so I have the list scrolling but without the items being refreshed...
or the items refreshed, but with no scroll... : )
This is getting on my nerves !! I think I will try the ScrollPane then...
06-01-2011 01:29 PM
Finally working !
Short story: I was preparing a BUG-report, my sample was not working as expected, and suddenly after set/reset some parameters, the list scrolled smoothly like a charm !
So I don't know what is/was the problem, but I could apply a workaround which consists to use a dummy Timer (1 ms is enough), in order to give enough time to the Tweener to be "aware" of the new List content:
(I don't like using Timer to randomly "wait" but... works fine here)
I don't know if this will work for all cases, and I still don't know if it's a bug, or if it is about the way I use QNX List inside a Spark project (using Renaun's QContainer), but the workaround is easy, and the result is very nice (as expected !) (thanks to the QNX library).
06-01-2011 08:16 PM