tufanv Expert Licensed User Longtime User Jan 21, 2016 #1 Hello, I am adding a name and score to a list as arrays and sort them by score. But when i use list.get(0) i get: B4X: (ArrayList) [[name=Tufan, IsInitialized=false, score=0 How can i only get the name from the list ? TY Last edited: Jan 21, 2016
Hello, I am adding a name and score to a list as arrays and sort them by score. But when i use list.get(0) i get: B4X: (ArrayList) [[name=Tufan, IsInitialized=false, score=0 How can i only get the name from the list ? TY
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2016 #2 You need to post more code. Upvote 0
tufanv Expert Licensed User Longtime User Jan 21, 2016 #3 ok. In process globals I hav e : B4X: Type person(name As String,score As Int) than I have a list B4X: dim siralama as list siralama.initialize p.name=username p.score=Round(olumlu/toplam*100) siralama.add(p) Than i sort the list B4X: siralama.SortType("score",False) Bow i want to use siralama.get(0) . When i do it i get : B4X: (ArrayList) [[name=Tufan, IsInitialized=false, score=0 What i want to do is only get the name from the list not the score. Erel said: You need to post more code. Click to expand... Upvote 0
ok. In process globals I hav e : B4X: Type person(name As String,score As Int) than I have a list B4X: dim siralama as list siralama.initialize p.name=username p.score=Round(olumlu/toplam*100) siralama.add(p) Than i sort the list B4X: siralama.SortType("score",False) Bow i want to use siralama.get(0) . When i do it i get : B4X: (ArrayList) [[name=Tufan, IsInitialized=false, score=0 What i want to do is only get the name from the list not the score. Erel said: You need to post more code. Click to expand...
DonManfred Expert Licensed User Longtime User Jan 21, 2016 #4 B4X: dim p as Person = siralama.get(0) log(p.Name) Upvote 0
tufanv Expert Licensed User Longtime User Jan 21, 2016 #5 DonManfred said: B4X: dim p as Person = siralama.get(0) log(p.Name) Click to expand... Thank you. I couldn't figure out . works perfect Upvote 0
DonManfred said: B4X: dim p as Person = siralama.get(0) log(p.Name) Click to expand... Thank you. I couldn't figure out . works perfect
DonManfred Expert Licensed User Longtime User Jan 21, 2016 #6 tufanv said: works perfect Click to expand... But is not ok for you to give an "like" for my answer? Upvote 0
tufanv Expert Licensed User Longtime User Jan 21, 2016 #7 I say thank you instead of likes . I didnt know that you liked likes more than thank you. DonManfred said: But is not ok for you to give an "like" for my answer? Click to expand... Upvote 0
I say thank you instead of likes . I didnt know that you liked likes more than thank you. DonManfred said: But is not ok for you to give an "like" for my answer? Click to expand...
DonManfred Expert Licensed User Longtime User Jan 21, 2016 #8 tufanv said: I didnt know Click to expand... Likes are my reputation in this forum. I like to be the one with the most likes; @Erel does not count, he is unbetable Upvote 0
tufanv said: I didnt know Click to expand... Likes are my reputation in this forum. I like to be the one with the most likes; @Erel does not count, he is unbetable
tufanv Expert Licensed User Longtime User Jan 21, 2016 #9 DonManfred said: Likes are my reputation in this forum. I like to be the one with the most likes; @Erel does not count, he is unbetable Click to expand... Ok I will give it a like from now on Sorry Upvote 0
DonManfred said: Likes are my reputation in this forum. I like to be the one with the most likes; @Erel does not count, he is unbetable Click to expand... Ok I will give it a like from now on Sorry