Persistence and supercalls under BlackBox

From: [at]} <Wojtek>
Date: Sun, 14 Feb 1999 16:19:17 -0500

Hi:

  I am a bit confused with persistence and supercalls under BlackBox.
According to my Oberon System experience, I need to supercall
an inherited Store/Load method to store/load inherited data
fields. Therefore, I have written my own Externalize procedure like
the following. Note the supercall.

 PROCEDURE (h: Histogram) Externalize- (VAR wr: Stores.Writer);
 BEGIN
  wr.WriteVersion(0);
  h.Externalize^(wr); (* parent class method supercall *)
  XiaArrays.StoreIntArray (wr, h.bin);
  XiaArrays.StoreRealArray (wr, h.xval);
  wr.WriteBool (h.calibrated)
 END Externalize;

However, when looking at Wolfgang Weck Graph sources,
his Externalize looks different, and it works without the supercall:

  String = ARRAY 256 OF CHAR;
  Figure = POINTER TO RECORD(GraphModels.Figure)
   s: String
  END;

 PROCEDURE (fig: Figure) Externalize (VAR wr: Stores.Writer);
 BEGIN
  wr.WriteVersion(0);
  wr.WriteString(fig.s)
 END Externalize;


I am wondering what is going on. Is the parent class' GraphModels.Figure

Externalize method called "automagically" ?

I looked at the Stores docu, and it does not say a word on the need
to make a supercall. However, my previous Oberon understanding
of the meaning of inheritance tells me that supercall has to be made.
(Just read the Mossenbock book, for example.)

Thus, I would welcome a few words of enlightment from anybody.
Thanks.

Wojtek
Received on Mon Feb 15 1999 - 01:22:54 UTC

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