Two questions about ETH Oberon (PlugIn)
Dear All, I've two questions for you, please. 1. There is this module (in OPCL): DEFINITION CmdLine; IMPORT Kernel32, SYSTEM; CONST length* = 1025; (*Windows 95 limit is 1024*) VAR text*: ARRAY length OF CHAR; END CmdLine. After initializing, it gets and made available the all characters of Win32 command line. How can I attach this text data to Texts.Scanner (to scan it with help of Oberon scanner)? And without saving the text to File. I can create Buffer (Texts.OpenBuf) and put the text here (B.WriteString). But I cannot attach this buffer to Scanner. Also I can create Texts.Reader, but then Texts.Text needs to be specified (in OpenReader), and this type is provided only for work with texts that are loaded (or saved) in filesystem. As I understand, attaching the Scanner to simple ARRAY OF CHAR is not possible now. But I'm in doubts, I'll be glad to get your opinion. 2. Do I understand correctly that all fonts in the ETH Oberon system are raster and have fixed size? How I can to proportionally increase the size of all the fonts in the system for a laptop with a small screen? Thanks. -- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
Do I understand correctly that all fonts in the ETH Oberon system are raster and have fixed size? How I can to proportionally increase the size of all the fonts in the system for a laptop with a small screen? == AFAIK ETHO displayed text is a sequence of rectangular objects of possibly various sizes. Hex.Open <fileName> ~ shows you the format of ETHO texts IIRC FontEditor.Panel shows the pixel stucture of the 'object' and allows you to modify it and create extra chars. I used the greater-than 128 Chars to allow display of Cyrillic with latin, in my custom font. == A BIG mistake of ETHO was not fixing the underline char's font. I made my own font. == Some Chapter*.Text which have 'diagrams embedded in the string of text', the 'diagram-object' may be bigger than the whole display [depending on the resolution]. This causes the user to not be able to scroll managable past the 'diagram-object'. Apparently because the smallest scroll-step is one 'object', and the 'diagram-object' is bigger than the whole display. Which means that it is not possible to see the 'diagram-object' PLUS the leading/following chars. This causes the new user to think that ETHO is broken. ======== How can I attach this text data to Texts.Scanner (to scan it with help of Oberon scanner)? And without saving the text to File. == To use <Oberon scanner> on a VAR text*: ARRAY length OF CHAR; I would think: <Oberon scanner> is designed to work on a 'Texts:type' which is 'located' in the 'display space'. Therefore the 'text*: ARRAY length OF CHAR' would need to be in a 'Texts:type'. Either by having its own 'Texts:type', or possibly by being appended to an existing 'Texts:type'. The 'Texts:type' is loaded from a file. But AFAIK it's not the need to come from a file that constrains it, but the fact that the method of 'broadcasting messages' to the display, requires the 'Texts:type' to be in the 'tree' of displays.
== Chris Glur On 2/4/13, Oleg N. Cher <allot@bk.ru> wrote:
Dear All,
I've two questions for you, please.
1. There is this module (in OPCL):
DEFINITION CmdLine;
IMPORT Kernel32, SYSTEM;
CONST length* = 1025; (*Windows 95 limit is 1024*)
VAR text*: ARRAY length OF CHAR;
END CmdLine.
After initializing, it gets and made available the all characters of Win32 command line.
How can I attach this text data to Texts.Scanner (to scan it with help of Oberon scanner)? And without saving the text to File.
I can create Buffer (Texts.OpenBuf) and put the text here (B.WriteString). But I cannot attach this buffer to Scanner.
Also I can create Texts.Reader, but then Texts.Text needs to be specified (in OpenReader), and this type is provided only for work with texts that are loaded (or saved) in filesystem.
As I understand, attaching the Scanner to simple ARRAY OF CHAR is not possible now. But I'm in doubts, I'll be glad to get your opinion.
2. Do I understand correctly that all fonts in the ETH Oberon system are raster and have fixed size? How I can to proportionally increase the size of all the fonts in the system for a laptop with a small screen?
Thanks.
-- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Oleg Chapter 14 of the book "The Oberon System, User Guide and Programming's Manual" explains handling with texts, buffers, readers, writers and scanners. VAR s: Texts.Scanner; t: Texts.Text; w: Texts.Writer; BEGIN Texts.OpenWriter(w); Texts.WriteString(w, CmdLine.text); t := TextFrames.Text(""); Texts.Insert(t, 0, w.buf); Texts.OpenScanner(s, t, 0); Texts.Scan(s); END Jörg On 04.02.2013, at 00:10, "Oleg N. Cher" <allot@bk.ru> wrote:
Dear All,
I've two questions for you, please.
1. There is this module (in OPCL):
DEFINITION CmdLine;
IMPORT Kernel32, SYSTEM;
CONST length* = 1025; (*Windows 95 limit is 1024*)
VAR text*: ARRAY length OF CHAR;
END CmdLine.
After initializing, it gets and made available the all characters of Win32 command line.
How can I attach this text data to Texts.Scanner (to scan it with help of Oberon scanner)? And without saving the text to File.
I can create Buffer (Texts.OpenBuf) and put the text here (B.WriteString). But I cannot attach this buffer to Scanner.
Also I can create Texts.Reader, but then Texts.Text needs to be specified (in OpenReader), and this type is provided only for work with texts that are loaded (or saved) in filesystem.
As I understand, attaching the Scanner to simple ARRAY OF CHAR is not possible now. But I'm in doubts, I'll be glad to get your opinion.
2. Do I understand correctly that all fonts in the ETH Oberon system are raster and have fixed size? How I can to proportionally increase the size of all the fonts in the system for a laptop with a small screen?
Thanks.
-- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (3)
-
eas lab -
Jörg Straube -
Oleg N. Cher