[Oberon] Re: N-O Scanner structure confusing ?
Bob Walkden
bob at web-options.com
Sat Feb 10 09:53:04 MET 2007
> > I use the ETH version for Windows, and the native version on bare
> > Intel hardware. N-O does not seem to have Oberon.FocusViewer.
> > Anybody know where the FocusViewer variable is in N-O?
> >
> If I had ETH version for Windows and time perhaps I'd examine
> what "Oberon.FocusViewer" does; and then see if N-O needs/has
> the same requirement.
Sorry, I was a little unclear. Neither of these versions includes
Oberon.FocusViewer.
FocusViewer tells you which Viewer has the keyboard focus. That is,
which one is displaying the caret.
--
Regards,
Bob
> Thomas wrote:
> > [...]
> > >
> > > > Here's a simple job which I can't acheive -- directly yet.
> > > > 1. set the caret
> > > > 2. scan from the caret until the token "END"
> > > > 3. reset the caret after the found token.
> > > >
[...]
> > >
> > > PROCEDURE Do*; (* Test.Do *)
> > > VAR F: TextFrames.Frame; S: Texts.Scanner;
> > > BEGIN
> > > F := Oberon.FocusViewer.dsc.next(TextFrames.Frame);
> > > IF F.hasCar THEN
> > > Texts.OpenScanner(S, F.text, F.carloc.pos); Texts.Scan(S);
> > > WHILE ~S.eot & ((S.class # Texts.Name) OR (S.s # "END")) DO
> > > Texts.Scan(S)
> > > END;(***)
> > > IF ~S.eot THEN
> > > TextFrames.SetCaret(F, Texts.Pos(S))
> > > END
> > > END
> > > END Do;
> > >
More information about the Oberon
mailing list