Hi,
I'm trying to populate a ListBox from a text file but I'm having a problem with the while loop. I looked at the Java IO code and am trying to use it with the common dialog. For some reason the Java IO doesn't like the While loop added to it. Here is the code that I'm trying to use. I'm not a Java developer so I really don't have a clue. If I take out the While loop the first item in the text file is loaded.
CommonDialog1.Filter = "Playlist files (*.plf)|*.plf|" & "All files|*.*"
CommonDialog1.ShowOpen
Dim FChnl As java#io#FileInputStream
Dim FGet As java#io#DataInputStream
Dim Text() As Byte
FChnl = New FileInputStream(CommonDialog1.FileName)
FGet = New DataInputStream(FChnl)
Redim Text(0 To CommonDialog1.FileName.length - 1)
FGet.readFully(Text)
While Text <> ""
lstPlaylist.AddItem New ListCellData(StrConv(Text, vbUnicode))
End While
FChnl.close