[Oberon] Re: Viewer marking.

peter at easthope.ca peter at easthope.ca
Wed Mar 14 17:50:14 CET 2018


From:	Andreas Pirklbauer <andreas_pirklbauer at yahoo.com>
Date:	Tue, 6 Mar 2018 18:21:27 +0100
> If you can modify module Oberon, just add the following procedure
>   PROCEDURE PointerOn*(): BOOLEAN;
>   ...

OK, thanks.  No problem with that.

What about generalizing?  Add the check to MarkedViewer?  

(** Returns the star-marked viewer. *)
    PROCEDURE MarkedViewer* (): Viewers.Viewer;
    VAR v: Viewers.Viewer; 
      IF PointerOn() THEN
        v := Viewers.This(Pointer.X, Pointer.Y)
        v := NIL
      RETURN v
    END MarkedViewer;

> Perhaps the reason why Sort traps is that Oberon.MarkedViewer
> returns the filler viewer, whose fields Viewers.FillerViewer.dsc
> and Viewers.FillerViewer.next are both always set to NIL.

Another possibility I failed to anticipate. Ideally a command should 
be bulletproof but that might be impossible.  Is there a practical way 
to check whether the Pointer is in a Text or Document viewer and not 
in the FillerViewer?

Thanks,                                               Lyall E.

This message was transmitted by software carefully written to avoid
the necessity, vulnerability and overhead of antivirus software.

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