[Oberon] A case in S3 Mail.Show.

peter at easthope.ca peter at easthope.ca
Fri Sep 13 21:06:49 CEST 2019


Hi,

In A2 Oberon, Mail.Show has this.

		Attributes.OpenScanner(S, Oberon.Par.text,Oberon.Par.pos);
		Attributes.Scan(S);
		IF S.class = Attributes.Int THEN (* Eg. Mail.Show 13 ~ was invoked. *)
			IF (S.i >= 0) & (S.i < noMsgs) THEN
				obj := FindObj("MailList");
				IF obj # NIL THEN
					WITH obj: ListGadgets.Frame DO
						line := obj.lines;
						REPEAT
							line.sel := msgs[S.i].pos = line.key;
							line := line.next
						UNTIL line = obj.lines;
						obj.sel := TRUE; obj.time := Oberon.Time();
						Gadgets.Update(obj)
					END
				END;
				decodeMessage(S.i, T, FALSE);
				ShowText("Mail.Text", T, TRUE)
			END
			
decodeMessage() and ShowText() are understandable.

Can anyone help to understand what is accomplished by the preceding lines? 
				obj := FindObj("MailList");
				IF obj # NIL THEN
					...
				END;

If the message number is with the command, it has been invoked from a Text; not 
from the Mail.Panel.  Then why is FindObj("MailList") involved?

The module is visible at https://en.wikibooks.org/wiki/Oberon/A2/Oberon.Mail.Mod .

Thanks,                    ... Lyall E.



-- 
https://en.wikibooks.org/wiki/Medical_Machines
https://en.wikibooks.org/wiki/Oberon
Tel: +1 604 670 0140            Bcc: peter at easthope. ca



More information about the Oberon mailing list