Skip to content

Commit d49abd1

Browse files
committed
Use TCastleTextReader, not TTextReader -- to not confuse with FPC / Delphi TTextReader
1 parent d1212c9 commit d49abd1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

modern_pascal_introduction.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,11 +1688,11 @@ S := Download('file:///home/michalis/my_binary_file.data');
16881688
S := Download('castle-data:/gui/my_image.png');
16891689
----
16901690

1691-
To read text files, we advise using the `TTextReader` class. It provides a line-oriented API, and wraps a `TStream` inside. The `TTextReader` constructor can take a ready URL, or you can pass there your custom `TStream` source.
1691+
To read text files, we advise using the `TCastleTextReader` class. It provides a line-oriented API, and wraps a `TStream` inside. The `TCastleTextReader` constructor can take a ready URL, or you can pass there your custom `TStream` source.
16921692

16931693
[source,pascal]
16941694
----
1695-
Text := TTextReader.Create('castle-data:/my_data.txt');
1695+
Text := TCastleTextReader.Create('castle-data:/my_data.txt');
16961696
try
16971697
while not Text.Eof do
16981698
WriteLnLog('NextLine', Text.ReadLn);
@@ -1701,7 +1701,7 @@ finally
17011701
end;
17021702
----
17031703

1704-
Documentation of all the _Castle Game Engine_ features to load and save streams, including the `Download` function and the `TTextReader` class, is on https://castle-engine.io/url .
1704+
Documentation of all the _Castle Game Engine_ features to load and save streams, including the `Download` function and the `TCastleTextReader` class, is on https://castle-engine.io/url .
17051705

17061706
[[generic-containers-section]]
17071707
### Containers (lists, dictionaries) using generics

modern_pascal_introduction_bg.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,11 +1581,11 @@ S := Download('file:///home/michalis/my_binary_file.data');
15811581
S := Download('castle-data:/gui/my_image.png');
15821582
----
15831583

1584-
За да четете текстови файлове, препоръчваме да използвате класа `TTextReader`. Той предоставя поредово API и съдържа в себе си `TStream`. Конструкторът `TTextReader` може да вземе готов URL адрес или вие можете да подадете там вашия персонализиран източник `TStream`.
1584+
За да четете текстови файлове, препоръчваме да използвате класа `TCastleTextReader`. Той предоставя поредово API и съдържа в себе си `TStream`. Конструкторът `TCastleTextReader` може да вземе готов URL адрес или вие можете да подадете там вашия персонализиран източник `TStream`.
15851585

15861586
[source,pascal]
15871587
----
1588-
Text := TTextReader.Create('castle-data:/my_data.txt');
1588+
Text := TCastleTextReader.Create('castle-data:/my_data.txt');
15891589
try
15901590
while not Text.Eof do
15911591
WriteLnLog('NextLine', Text.ReadLn);

modern_pascal_introduction_russian.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,11 +1041,11 @@ S := Download('https://castle-engine.io/latest.zip');
10411041
S := Download('file:///home/michalis/my_binary_file.data');
10421042
----
10431043
1044-
Чтобы прочитать обычный текстовый файл лучше использовать класс `TTextReader` из `CastleClassUtils`. Он предоставляет построчный API, как надстройку над `TStream`. URL можно задать через конструктор класса `TTextReader`, либо можно передать ему готовый `TStream` вручную.
1044+
Чтобы прочитать обычный текстовый файл лучше использовать класс `TCastleTextReader` из `CastleClassUtils`. Он предоставляет построчный API, как надстройку над `TStream`. URL можно задать через конструктор класса `TCastleTextReader`, либо можно передать ему готовый `TStream` вручную.
10451045
10461046
[source,pascal]
10471047
----
1048-
Text := TTextReader.Create('castle-data:/my_data.txt');
1048+
Text := TCastleTextReader.Create('castle-data:/my_data.txt');
10491049
while not Text.Eof do
10501050
WriteLnLog('NextLine', Text.ReadLine);
10511051
----

modern_pascal_introduction_ukrainian.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,11 +1576,11 @@ S := Download('file:///home/michalis/my_binary_file.data');
15761576
S := Download('castle-data:/gui/my_image.png');
15771577
----
15781578

1579-
To read text files, we advise using the `TTextReader` class. It provides a line-oriented API, and wraps a `TStream` inside. The `TTextReader` constructor can take a ready URL, or you can pass there your custom `TStream` source.
1579+
To read text files, we advise using the `TCastleTextReader` class. It provides a line-oriented API, and wraps a `TStream` inside. The `TCastleTextReader` constructor can take a ready URL, or you can pass there your custom `TStream` source.
15801580

15811581
[source,pascal]
15821582
----
1583-
Text := TTextReader.Create('castle-data:/my_data.txt');
1583+
Text := TCastleTextReader.Create('castle-data:/my_data.txt');
15841584
try
15851585
while not Text.Eof do
15861586
WriteLnLog('NextLine', Text.ReadLn);

0 commit comments

Comments
 (0)