I keep finding that a block of code I use to find file, list them in a listview, then get the first value of the item when clicked is causing an OutOfRange exception but only once the application has been published.
The JIT Debugger gives me this;
Parameter name: index.
The code trying to do the work;
' Single click on a log file should load that file Private Sub LogFileSelected() Handles ListView3.SelectedIndexChanged Dim fileName As String = ListView3.SelectedItems.Item(0).Text Dim filePath As String = LogFileDir + fileName ' Call ReadToChart to fill the chart with data from that file. ReadToChart(filePath) End Sub
If I click continue from the debugger, the code actions its task exactly as intended,
and I have not been able to replicate the issue from the designer so I can't tell why it does it.
It also only does it after a logfile has already been selected, so second selected item then every subsequent item thereafter.
This post has been edited by Saldash: 01 May 2012 - 03:04 PM