I would like to load CSV data from a webresponse variable into a ListBox, but I get the error "Object reference not set to an instance of the object." Is there a way around this?
What is the tipe of the "Response" control?
Does the getresponse statements retrieve any result?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
the "result" is the result of a WebReponse function and data is actually returned successfully (I verified that with a msgBox that displays the value of "result").
These are the properties and methods supported by a listbox...
Quote:
Properties and Methods:
Add
BringToFront
Clear
Color
Count
Dispose
Enabled
Focus
FontColor
FontSize
Height
Insert
Item
Left
Name
Refresh
Remove
RemoveAt
SelectedIndex
Top
Visible
Width
Events:
GotFocus
SelectionChanged
LostFocus
The is no loadcsv method in a listbox, but there is one tablecontrol...
Code:
Properties and Methods: AddCol AddRow BringToFront CaseSensitive Cell Clear ColCount ColName ColNumber Color ColWidth Dispose Enabled Filter Focus FontColor FontSize HeaderColor HeaderFontColor HeaderVisible Height Left LinesColor LoadCSV LoadXML Name Refresh RemoveCol RemoveRow RowCount SaveCSV SaveXML SelectCell SelectedCol SelectedRow TableSort Top Visible Width Events: SelectionChanged
Wich you can read and populate the listbox...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
Ok so when I changed it into a Table control, it thinks "result" is the name of the file. How can I take "response" and feed that into a file and then send that file name to this LoadCSV function?
Were does the data came from? a file or from a web site?
If all the data cames in a simple string with a know separator you can use StrSplit
Quote:
StrSplit Previous Top Next
--------------------------------------------------------------------------------
Splits a string and returns an array of strings.
Syntax: SrtSplit (RawString, Separators)
RawString - The string that will be split.
Separators - Zero or more characters that act as the separators.
If the Separators string is an empty string then all white characters will be used as the separators.
Example:
Sub Globals
dim words(0) as string
End Sub
Sub App_Start
sentence = "$GPGGA,161229.487,3723.2475,N,12158.3416,W,1,07,1 .0,9.0,M,,,,0000*18"
words() = StrSplit(sentence, ",")
for i = 0 to ArrayLen(words())-1
msgbox(words(i))
next
End Sub
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!