Jump to content


CSE

Member Since 25 May 2009
Offline Last Active Apr 17 2023 11:12 AM
-----

Topics I've Started

LoadFromTextFile not working compiled with XE2

02 July 2013 - 02:31 PM

Hello,

i am using LoadFromTextfile function of TNextGrid to read a none unicode textfile into the grid.

Short time ago i compiled my project first time in XE2 and LoadFromTextFile function stopped working.

I think it has to do with unicode string/char types used in xe2.

I changed the bold lines, and textfile is readed correctly now.

procedure TNxCustomGridControl.LoadFromTextFile(const FileName: WideString;
Separator: WideChar = ','; MultiLineSeparator: WideChar = '|';
StartRow: Integer = 0);
var
b: Byte;
w: Word;
fw: File of WideChar;
f: File of Byte;
fa: File of AnsiChar; //File of Char;
QChar, wc: WideChar;
Ch: AnsiChar; //Char;
QNo: Integer;
Value: WideString;
UnicodeFile, UnicodeBigEndian, AddValue, NewRow, EofF: Boolean;
ColumnIndex, RowIndex, ReadIndex: Integer;
begin