Re: View question

From: [at]} <Gérard>
Date: Wed, 9 Jan 2002 00:14:38 +0100

Hello Bart,

> Is it
> correct to say that only the final state of the text is always displayed,
> and no intermediate ones?

Yes, it is.

> And in order to create intermediate views
> (snapshots) I presume I have to clear the text model every time (and what
> about the view?).

The TextView shows exactly what you have already written at any time. Try
the next example:

MODULE BtryView;

IMPORT Ports, Views, TextModels, TextMappers, TextViews, Services;

TYPE

 Action= POINTER TO RECORD (Services.Action)
 END;

VAR

 f: TextMappers.Formatter;

PROCEDURE (a: Action) Do;

 BEGIN (*Do*)
  f.WriteString('RECORD 2'); f.WriteLn;
 END Do;


PROCEDURE Display*; (* <commander here>BtryView.Display *)
VAR
t: TextModels.Model; v: TextViews.View; a: Action;

BEGIN
t := TextModels.dir.New();
f.ConnectTo(t);

f.WriteString('RECORD 1'); f.WriteLn;
v := TextViews.dir.New(t);
Views.OpenView(v);

NEW(a); Services.DoLater(a, Services.Ticks()+ 2* Services.resolution);

END Display;

END BtryView.



--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy
Received on Tue Jan 08 2002 - 23:14:38 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:46 UTC