[Oberon] problem with code
chris at cfbsoftware.com
Sat Sep 4 04:32:12 MEST 2010
> -----Original Message-----
> From: oberon-bounces at lists.inf.ethz.ch
> [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of Duke Normandin
> Sent: Saturday, 4 September 2010 11:32 AM
> To: Oberon List
> Subject: [Oberon] problem with code
> However, after "marking" some text - say Chapter5.Text - by using F1,
> the code "Traps" out and hoses the Text Viewer, i.e. I can't Grow it,
> Close it, nothing! BTW, is there a way to redraw the screen/viewer?
> I guess I have to learn to use the "Trap" info, which Reiser's book
> will probably expound on. In the meantime, can anybody see what could
> be making the above code behave so badly when executed? It compiles
> cleanly. TIA...
This is the process I went through:
1. I scrolled down the trap viewer until I got to the part which references
Font2Courier12.Highlight PC = 79
T = 009CC780H Texts.TextDesc
fnt = 00000000H (Fonts.FontDesc)
2. This tells me that the value of fnt is zero which makes me suspect the
fnt := Fonts.This("Courier12.Scn.Fnt ");
3. I guessed that zero means that the font could not be found.
4. I confirmed that the font was present.
5. Maybe the problem is the trailing blank in the font name?
6. Edited, recompiled and it works!
To make your code more stable, check that fnt is not NIL before calling
Astrobe: ARM Oberon-07 Development System
More information about the Oberon