[Oberon] Text Viewer vs. Doc Viewer and etc.

peter at easthope.ca peter at easthope.ca
Sat Mar 25 23:14:24 CET 2017


P.s. I think of the following but haven't found how
to make the criteria.  If there is a more clever way, 
I'm interested in that also.  
            Thanks,       ... l.e. 

IF criterion0  THEN
	Oberon.AllocateUserViewer(Oberon.Par.vwr.X, X, Y);
	V := MenuViewers.New(
		TextFrames.NewMenu(name, Menu),
		TextFrames.NewText(text, 0),
		TextFrames.menuH,
		X, Y)
ELSEIF criterion1
	D:=Gadgets.CreateObject("TextDocs.NewDoc");
	IF	D#NIL	THEN
		NEW(TF); TextGadgets.Init(TF, text, FALSE); D(Documents.Document).W:=300;
		COPY(name, D(Documents.Document).name);
		Documents.Init(D(Documents.Document), TF);
		Desktops.ShowDoc(D(Documents.Document))
	END
ELSE 
	Texts.WriteString(W, "Kind of viewer not recognized."); Texts.WriteLn(W); 
	Texts.Append(Oberon.Log, W.buf)
END;

-- 

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



More information about the Oberon mailing list