Crash using flexible Table , Table.bas version2.28.......
1) Reading a table (Citylist_sc.csv) into view works fine with
"Table1.LoadTableFromCSV2(File.DirDefaultExternal, "//NGT/t/citylist_sc.csv", True, ";", True)"
2) Editing only one field works fine with
Table1.UpdateCell(col, row, strNameText )
3) Save to CSV File (citylist_sc_Written.csv) works fine using
Table1.SaveTableToCSV(strPfad, "citylist_sc_Written.csv")
4) !!!!!!!!
After that Saving the File (citylist_sc_Written.csv), You you are not able to use/read this file into a new Table, it is crashing with Error when executing:
Public Sub SetColumnsWidths(Widths() As Int)
....
Dim v As View
Dim w As Int
For col = 0 To Widths.Length - 1
v = Header.GetView(col)
w = Max(2dip, Widths(col) - cLineWidth)
v.Width = w '(Crashing here!!!!)
If col > 0 Then
v.Left = Header.GetView(col - 1).Left + Widths(col - 1)
End If
Next
.....
Error: java.lang.runtimeExeption: Objekt should first be initialized (View) .....
When you have a look at the two files with notepad++, you will see, that in the original file (citylist_sc.csv), there are "CRLF" at the end of row..
After saving the File (citylist_sc_Written.csv) , there are only "LF" At the end of row.. It seems that only "CRLF" rows could be read?
What is going wrong? Bug in "Table1.SaveTableToCSV" command?
Could anyone reproduce my problem? Need help..
Regards
Rainer
1) Reading a table (Citylist_sc.csv) into view works fine with
"Table1.LoadTableFromCSV2(File.DirDefaultExternal, "//NGT/t/citylist_sc.csv", True, ";", True)"
2) Editing only one field works fine with
Table1.UpdateCell(col, row, strNameText )
3) Save to CSV File (citylist_sc_Written.csv) works fine using
Table1.SaveTableToCSV(strPfad, "citylist_sc_Written.csv")
4) !!!!!!!!
After that Saving the File (citylist_sc_Written.csv), You you are not able to use/read this file into a new Table, it is crashing with Error when executing:
Public Sub SetColumnsWidths(Widths() As Int)
....
Dim v As View
Dim w As Int
For col = 0 To Widths.Length - 1
v = Header.GetView(col)
w = Max(2dip, Widths(col) - cLineWidth)
v.Width = w '(Crashing here!!!!)
If col > 0 Then
v.Left = Header.GetView(col - 1).Left + Widths(col - 1)
End If
Next
.....
Error: java.lang.runtimeExeption: Objekt should first be initialized (View) .....
When you have a look at the two files with notepad++, you will see, that in the original file (citylist_sc.csv), there are "CRLF" at the end of row..
After saving the File (citylist_sc_Written.csv) , there are only "LF" At the end of row.. It seems that only "CRLF" rows could be read?
What is going wrong? Bug in "Table1.SaveTableToCSV" command?
Could anyone reproduce my problem? Need help..
Regards
Rainer