[squeak-dev] [5.2a] styled text in a class comment spawns endless subscript out-of-bounds

Chris Muller ma.chris.m at gmail.com
Thu Jul 5 04:34:05 UTC 2018

> The 'browse origin' search does not seem to find it (maybe I'm using it wrong?).

Most likely.  It searches in the repository that's first in teh list
(excepting package-cache, of course) for that package.

My guess is, you still have the "squeak50" repository first.

If you put "trunk" first, then browse origin gives you the below:

How can we make this easier to use so that 'browse origin' can
possibly be useful in cases like this?

Name: Morphic-nice.559
Author: nice
Time: 3 August 2011, 11:47:38.397 pm
UUID: 2d464aec-2c88-4ad0-9f51-6c208b5cdf82
Ancestors: Morphic-nice.558

Let TextEditor be event driven and let us ban sensor usage from it.


I tried to apply Cuis 3.3 methods where possible and kept Squeakism
where necessary.

There are unused methods that crept into the Editor classes, but we'll
see later about further convergence with Cuis or not...

Like Cuis, I renamed ivar beginTypeInBlock -> beginTypeInIndex because
this is an Integer index, not a CharacterBlock.
Code is already long enough to avoid such traps.
I also removed sensor and the structure of the TextEditor did change a
lot. So it's hard to say if code is reloadable... The inbox will be a
test place.

Like Cuis I removed the typeAheadStream which was useless already
since we recompose after each key stroke.
Instead of such stream, the keyboard event is passed as argument to
editing methods.

Some small divergences:

I did not define TextEditor>>#processKeyboardEvent: but TextEditor>>#keyStroke:
My rationale was that mouseUp: mouseDown: and mouseMove: were not
renamed, so why renaming keyStroke: ?
On the other hand, it would be easier to follow code with different
selectors, and maybe also good for a VM to reduce unecessary

I did not define TextEditor>>#dispathOn: but
I felt this was more clear... less unecessary polymorphism. My mood
was changing ;)

These above two behaviours have not been unified (Cuis only deal with
256 characters and can offer a dispatch table for all characters, we

Unlike Cuis I did not implement multi selection (?).
I also kept the oldInterval and otherInterval ivars because I don't
know if I can touch them.
I also kept selectionShowing because I'm totally unaware of these details.

I did not yet imported the SimpleEditor.
Thanks to Juan for leading the process, and cross the fingers to see
if update is possible or require intermediate stages.

> But the method originally entered Squeak here:
>   Name: Morphic-ar.149
>   Author: ar
>   Time: 6 August 2009, 4:23:12 am
>   UUID: fc14d160-97da-6142-8002-827d24037a57
>   Ancestors: Morphic-jmv.148
>   Integrate Cuis text editors. The new classes are Editor and TextEditor
>   (in Morphic-Text Support). TextMorph now honors the preference
>   #userNewEditors to determine whether to use the (old) TextMorphEditor
>   or the (new) TextEditor (shameless plug: pragma preferences rock; check
>   out TextMorph class>>useNewEditors).  There is still a ways to go before
>   this will work but it gives us the starting point to knock down the
>   remaining issues with the editors (mostly keyboard shortcut issues).
> If you look at senders of selectInvisiblyFrom:to: in Squeak, there are
> several cases where the sender subtracts 1 from the stop index before
> sending. There are no such cases in Cuis.
> Dave

More information about the Squeak-dev mailing list