Skip to first unread message

Kurien Eapen

unread,
Jan 16, 2016, 12:03:42 AM1/16/16
to MIT App Inventor Forum
I wanted to open a list with a particular index.I tried to set the selection index with the index value with which i wanted to open it with, but it is not working.Can someone help ?

Ghica

unread,
Jan 16, 2016, 10:20:45 AM1/16/16
to MIT App Inventor Forum
To my opinion, you must be confused about lists. Try to find out more about it!
you might want to learn how to work with list of lists

First of all, what is in the global ViewSongList? Find out by using DoIt on a get global ViewSongList block (click with your right mouse button on it and choose DoIt.
Second: in each item in the for each block, there is a list element, not an index, so the first line "set ListView1.SelectionIndex is certainly nonsense.
Third, what is the ListView For? It is a component that can display a list of strings and then you can choose one of them. Next, you have to do something with that selection.
But from your code, I suspect that you already made the selection and that you want to do something with it. But what???
Cheers, Ghica.

 

Kurien Eapen

unread,
Jan 16, 2016, 11:55:33 AM1/16/16
to MIT App Inventor Forum
Thanks Ghica for the reply, i went through the links that you send but i still couldn't find what i was looking for maybe i was too vauge in conveying what i wanted to do . I am making a music app and i was trying to use the view list to view all the songs.It works fine in that respect to select songs but my problem is after selecting the song if i skip a few songs and then open the view list it opens with the last selection.I want it to open with the current song .I hope you understand what I'm trying to ask .

Regards
Kurien

Taifun

unread,
Jan 16, 2016, 4:42:59 PM1/16/16
to mitappinv...@googlegroups.com
I wanted to open a list with a particular index
it seems to be, you are talking about opening a listview...

I don't think you can set a specific index for a listview programmatically... the listview component is somewhat restricted...
but you could do it with the Spinner component... see test project attached...

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

kurien.aia

Kurien Eapen

unread,
Jan 20, 2016, 5:26:47 AM1/20/16
to MIT App Inventor Forum
Thanks a lot Taifun.I went through the attachment and it proved to be very useful i get the concept now. 
Reply all
Reply to author
Forward
0 new messages