[Oberon] Re (2): Revision of a Text vs. update of display in a Gadget.

peter at easthope.ca peter at easthope.ca
Sun Mar 8 16:07:15 CET 2020

> CutLines does not move any byte in memory. („Insert“ does not move bytes!!)

OK, I walked straight into a pitfall.  Should have reviewed Insert 
before using.

> But on every „n“ characters „Insert“ updates the screen.

... M: UpdateMsg; ... 
M.text := T; M.F := NIL; M.beg := pos; M.end := pos; M.len := B.len;
... Display.Broadcast(M) ...

So, no need for concern for simple Text viewer vs. Gadget viewer.  
Broadcast is everywhere.

> The Wrap code is the exact opposite: it moves around a lot of bytes 
> in memory (copy buffers) but I couldn’t find any screen update.

Each buffer is a word or one or more characters of whitespace.   So an 
average buffer copy is five or six or seven characters.  (A 
calculation can be added.)

I need to "return to the drawing board".  Obvious question in my 
thought: which is worse--pointer reassignments or small buffer copies?

Thanks for catching the blunders,                ... L.

Tel: +1 604 670 0140            Bcc: peter at easthope. ca

More information about the Oberon mailing list