[squeak-dev] Are there some standard methods of embedding foreign controls into the Squeak desktop?

Frank Shearar frank.shearar at gmail.com
Sat Jan 12 13:25:41 UTC 2013


On 12 January 2013 12:38, Frank Church <vfclists at gmail.com> wrote:
> I have seen this demo on Sean's blog:
> http://seandenigris.com/blog/?p=723 which shows a QuickTime movie
> playing on the squeak desktop. Is there some generalized way of
> getting external controls to show up in Morphic controls or the Squeak
> desktop itself?
>
> I am interested in get text editing controls to appear inside the
> World view. However I also think that being able to use alternative
> syntax highlighters inside TextMorphForEditView may be a better
> alternative. is the Syntax highlighting in TextMorphForEditView
> hardwired for Smalltalk syntax?

In Squeak, syntax highlighting's done by Shout. Models interested in
doing (Smalltalk) syntax highlighting implement #aboutToStyle: (see
CodeHolder subclases), returning true.

The precise highlighter is controlled by #shoutParserClass. By default
(in Behavior class) that's an SHParserST80. I don't see why one
couldn't use a different expression parser.

In short, the syntax highlighting is completely independent of the UI
widgets like TextMorphForEditView.

I meant to tear Lukas Renggli's LanguageBoxes/Helvetia work to pieces
so as to bring it back to life, but haven't yet found the time.
Helvetia aims to bring arbitrary parsers, compilers and highlighting
for same to the various tools, to allow other languages to be used
within an image. It's really interesting tech, and I really do need to
find the time to hack on it.

frank

> --
> Frank Church
>
> =======================
> http://devblog.brahmancreations.com
>


More information about the Squeak-dev mailing list