Hi:
thank Stewart Greenhill <greenhil{([at]})nowhere.xy
for explanations concerning view printing.
Now I have a question that Oberon Microsystems will hate:
how do I store/load procedure variables? I looked at Stores
definition and there no Writer/Reader methods there concerning
pointer storing/loading nor procedure variables.
I have read a somewhat obsure statement in BB dosc that
procedure variables are a bad thing, and that one has to use
"composition" instead, but I am not there yet to know what
composition is. Therefore, I have defined one of my types as
Mapper* = PROCEDURE (a: Axis; xreal: REAL): INTEGER;
InvMapper* = PROCEDURE (a: Axis; xint: INTEGER) : REAL;
Axis* = POINTER TO RECORD
x0, x1, delta: REAL;
i0, i1: INTEGER;
map*: Mapper; (** world --> view, installable *)
inv*: InvMapper (** view --> world, installable *)
END;
I believe this to be a very flexible solution inspired by
System-3 framework where all handlers are installable.
Now I am scratching my head how to make the Axis persistent.
Shouls I introduce a case variable "axisKind: INTEGER",
store the value of that variable, and upon loading make a
CASE statement which would install a proper mapper?
Such a solution will work, but is hardly extensible.
Any suggestions what is the recommended way of dealing with
installable behavior?
Thank you in advance,
Wojtek
Received on Sat Feb 13 1999 - 04:28:31 UTC