[Oberon] Re: N-O: HOW2 SelectTextStretch given beg, end ?

Chris Glur crglur at absamail.co.za
Sat Jan 13 15:04:26 MET 2007


> > I can't guess where the code would be to 'SetSelection'
> > as per mouse activation ?
> > 

Chris Burrows wrote:
> In ETH Oberon v2.4 Plugin for Windows 'TextFrames.SetSelection' 
> looks promising.

It looks massively convoluted to me !

Bernhard Egger wrote:
> For me, the following code works in Bluebottle Oberon:
> 
> moving the current selection by 5 characters:
> 
> PROCEDURE MoveSelection*;
--snip--
> setting a new selection in the marked (*) text:
> 
> PROCEDURE SetSelection*;
--snip--

Thanks, these work nicely.

I've made some wrong assumptions at the highest level.
That's why 'top-down' design is best.
If I use positioning the caret after the closing-'bracket'
AND selecting up to the closing-'bracket', AND the
closing-'bracket' is off screen then [apparently] the 
caret-stepping, looses the beginning selection of the 
block.  It's what it LOOKS like to the user that matters.

I favour data/table-driven programming, where possible.
Then many types of nested-bracketed-text can be 
handled, other than "IF <expn> THEN <stmt> END"
types.

I'll start putting it to Edgar's wiki.
Probably at: 
  http://www.edgar-schwarz.de/mm/HiliteBlocks

For those like me, who don't want their text to be 
auto-reformatted, use short lines and '[[BR]]' as a
line-terminator for wiki.  

Now I'm going to try to post & paste:
A problem is to quickly see the block-structure of source code[[BR]]
when the blocks/nested-statements extend over multiple screens.[[BR]]

Thanks,

== Chris Glur.



More information about the Oberon mailing list