Hallo Zusammen!
BTW:ICH HASSE DIE NEUE UTF-16
VCL!
Alt:
Delphi-Quellcode:
{$IFNDEF CLR}
PConversionFormat = ^TConversionFormat;
{$ENDIF}
TConversionFormat = record
ConversionClass: TConversionClass;
Extension: string;
Next : PConversionFormat;
end;
Neu:
Delphi-Quellcode:
{$IFNDEF CLR}
PConversionFormat = ^TConversionFormat;
{$ENDIF}
TConversionFormat = record
ConversionClass: TConversionClass;
Extension: string;
end;
Und Jetzt? Wie sicht man ohne den Next Pointer den nächsten converter?
Früher ging das so:
Delphi-Quellcode:
procedure TRichEditStrings98.LoadFromFile(const FileName: string);
var
Ext: string;
Convert: PConversionFormat;
begin
Ext := AnsiLowerCaseFileName(ExtractFileExt(Filename));
System.Delete(Ext, 1, 1);
Convert := ConversionFormatList;
while Convert <> nil do
with Convert^ do
if Extension <> Ext then Convert := Next
else Break;
if Convert = nil then
Convert := @TextConversionFormat;
FConverter := Convert^.ConversionClass.Create;
try
inherited LoadFromFile(FileName);
except
FConverter.Free;
FConverter := nil;
raise;
end;
end;
Mavarik
PS.: Ich glaub ich deinstalliere XE2 wieder...!