list data access

40 views
Skip to first unread message

Damian Kao

unread,
May 10, 2011, 7:27:20 PM5/10/11
to ukijs
Is it possible to access the list data array to change specific items?
For example if I have a list of numbers, 0-50. I can access that array
and change the first element to something else and then relayout the
list to reflect that change? Or would I have to pass a whole new array
to the list to change that first element?

Damian Kao

unread,
May 11, 2011, 5:55:16 AM5/11/11
to ukijs
I tried

myList.data()[0] = 'test'

I was able to change the first element of the data array to "test". I
confirmed it by scrolling the list down and then scrolling back up the
first element to see the first element changed to "test".

I noticed there was a method redrawRow(rowNumber). I tried
myList.redrawRow(0), but it didn't work. I then tried
alert(myList.redrawRow) to see if the function was being called and it
gave me undefined. Has this method not been implemented yet?

Vladimir Kolesnikov

unread,
May 11, 2011, 1:44:27 PM5/11/11
to uki google group
redrawRow should work in 0.3.*. It might be not exported to collection
level though. So if you get myList from uki() call you might need to do
myList[0].redrawRow

I just pushed redrawRow for 0.4

Reply all
Reply to author
Forward
0 new messages