Suppose this test is compiled in A2. If the context is removed it can compile in S3 as well. MODULE MarkingTest IN Oberon; IMPORT Documents, Oberon, Texts; VAR W: Texts.Writer; PROCEDURE T*; (* No parameters. *) BEGIN IF Oberon.MarkedViewer() # NIL THEN Texts.WriteString(W, "A Text viewer is marked."); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) ELSIF Documents.MarkedDoc() # NIL THEN Texts.WriteString(W, "A Document viewer is marked."); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) ELSE Texts.WriteString(W, "No viewer is marked."); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) END END T; BEGIN Texts.OpenWriter(W) END MarkingTest. MarkingTest.T always reports "A Text viewer is marked." Pressing F2 to remove the marker has no effect. How is viewer marking detected correctly? Thanks, ... Lyall E. -- 123456789 123456789 123456789 123456789 123456789 123456789 123456789 Tel: +1 360 639 0202 Pender Is.: +1 250 629 3757 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
Peter Did you read this intro into the Gadget system: http://www.ethoberon.ethz.ch/ethoberon/tutorial/GadgetsIntro.html Jörg -----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of peter@easthope.ca Sent: Tuesday, March 06, 2018 5:25 PM To: oberon@lists.inf.ethz.ch Subject: [Oberon] Viewer marking. Suppose this test is compiled in A2. If the context is removed it can compile in S3 as well. MODULE MarkingTest IN Oberon; IMPORT Documents, Oberon, Texts; VAR W: Texts.Writer; PROCEDURE T*; (* No parameters. *) BEGIN IF Oberon.MarkedViewer() # NIL THEN Texts.WriteString(W, "A Text viewer is marked."); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) ELSIF Documents.MarkedDoc() # NIL THEN Texts.WriteString(W, "A Document viewer is marked."); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) ELSE Texts.WriteString(W, "No viewer is marked."); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) END END T; BEGIN Texts.OpenWriter(W) END MarkingTest. MarkingTest.T always reports "A Text viewer is marked." Pressing F2 to remove the marker has no effect. How is viewer marking detected correctly? Thanks, ... Lyall E. -- 123456789 123456789 123456789 123456789 123456789 123456789 123456789 Tel: +1 360 639 0202 Pender Is.: +1 250 629 3757 http://easthope.ca/Peter.html Bcc: peter at easthope. ca -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (2)
-
Jörg -
peter@easthope.ca