basicFormat method missing in SHTextStylerST80?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

basicFormat method missing in SHTextStylerST80?

Mark Aufflick-6
Hi everyone,

As suggested by Milan Zimmermann, I am re-posting this question from
squeak-newbies.

I think that my smalltalk conversion will be much nicer if I can get
the SVI emacs-like environments up and running.

The editor and workspace work great, but the SVI ClassBrowser  fails
at the following point:

PluggableSVIShoutMapMorph>>preStyleText
       ...
       basicStyle: (aText _ styler basicFormat: t asText).

Where styler is an instance of SHTextStylerST80. Problem is it has no
basicFormat method. The only reference to a basicFOrmat method via
google is:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077901.html

which is hardly useful in this case, although it does point to the
function of the method.

Firstly, I seem to be able to emulate the intention of the code by
replacing PluggableSVIShoutMapMorph>>preStyleText with:

preStyleText: t

       |aText|

       (Preferences syntaxHighlightingAsYouType not or: [t size > self
styleSizeLimit])
               ifTrue:[^t].

       styler
               ifNil: [ ^t ]
               ifNotNil:[styler
                                       classOrMetaClass: svi
selectedClassOrMetaClass;
                                       format: (aText := styler
styledTextFor: t asText).
                               ^aText].

This also points to a challenge that the ST community has with regards
to it's use of traditional SCM. Since most coding projects (say Rails)
use a "standard" text based SCM like CVS or subversion, they can run
simple web interfaces allowing access to all versions of all source
files. A huge benefit of that is that I can google for some class and
method names (that may be in either an upcoming version or may have
been deprecated years ago) and I will often find the source that
implements that method which is a good starting point, even if noone
has ever mentioned my specific issue.

There don't seem to be any such online viewable repositories of, say,
the squeak core. Is there any kind of repositary that would be
suitable for putting a read only web front end on? Ideally with more
granularity than just the snapshots of released image versions.

Cheers,

Mark.

--
Mark Aufflick
 e: [hidden email]
 w: mark.aufflick.com
 p: +61 438 700 647
 f: +61 2 9436 4737

Reply | Threaded
Open this post in threaded view
|

Re: basicFormat method missing in SHTextStylerST80?

Andrew Tween
----- Original Message -----
From: "Mark Aufflick" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, July 11, 2006 7:43 AM
Subject: basicFormat method missing in SHTextStylerST80?


> Hi everyone,
>
> As suggested by Milan Zimmermann, I am re-posting this question from
> squeak-newbies.
>
> I think that my smalltalk conversion will be much nicer if I can get
> the SVI emacs-like environments up and running.
>
> The editor and workspace work great, but the SVI ClassBrowser  fails
> at the following point:
>
> PluggableSVIShoutMapMorph>>preStyleText
>        ...
>        basicStyle: (aText _ styler basicFormat: t asText).
>
> Where styler is an instance of SHTextStylerST80. Problem is it has no
> basicFormat method. The only reference to a basicFOrmat method via
> google is:
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077901.html
>
> which is hardly useful in this case, although it does point to the
> function of the method.

The basicFormat: method was removed from Shout some time ago.
I had added the styledTextFor: to achieve the same purpose, and so your fix is a
good one.


>
> Firstly, I seem to be able to emulate the intention of the code by
> replacing PluggableSVIShoutMapMorph>>preStyleText with:
>
> preStyleText: t
>
>        |aText|
>
>        (Preferences syntaxHighlightingAsYouType not or: [t size > self
> styleSizeLimit])
>                ifTrue:[^t].
>
>        styler
>                ifNil: [ ^t ]
>                ifNotNil:[styler
>                                        classOrMetaClass: svi
> selectedClassOrMetaClass;
>                                        format: (aText := styler
> styledTextFor: t asText).
>                                ^aText].
>
> This also points to a challenge that the ST community has with regards
> to it's use of traditional SCM. Since most coding projects (say Rails)
> use a "standard" text based SCM like CVS or subversion, they can run
> simple web interfaces allowing access to all versions of all source
> files. A huge benefit of that is that I can google for some class and
> method names (that may be in either an upcoming version or may have
> been deprecated years ago) and I will often find the source that
> implements that method which is a good starting point, even if noone
> has ever mentioned my specific issue.
>
> There don't seem to be any such online viewable repositories of, say,
> the squeak core. Is there any kind of repositary that would be
> suitable for putting a read only web front end on? Ideally with more
> granularity than just the snapshots of released image versions.

the code for Shout is on SqueakSource...
http://www.squeaksource.com/shout.html

Where all the old versions can be browsed/downloaded

Cheers,
Andy

>
> Cheers,
>
> Mark.
>
> --
> Mark Aufflick
>  e: [hidden email]
>  w: mark.aufflick.com
>  p: +61 438 700 647
>  f: +61 2 9436 4737
>
>

Reply | Threaded
Open this post in threaded view
|

Re: basicFormat method missing in SHTextStylerST80?

Mark Aufflick-6
Thanks.

I see that the source is there - good to know. Th browser requires
javascript though, hence why the content isn't indexed by Google. May
I suggest that squeaksource adds plain text rendered pages for google
to index?

On 7/11/06, Andrew Tween <[hidden email]> wrote:

> ----- Original Message -----
> From: "Mark Aufflick" <[hidden email]>
> To: <[hidden email]>
> Sent: Tuesday, July 11, 2006 7:43 AM
> Subject: basicFormat method missing in SHTextStylerST80?
>
>
> > Hi everyone,
> >
> > As suggested by Milan Zimmermann, I am re-posting this question from
> > squeak-newbies.
> >
> > I think that my smalltalk conversion will be much nicer if I can get
> > the SVI emacs-like environments up and running.
> >
> > The editor and workspace work great, but the SVI ClassBrowser  fails
> > at the following point:
> >
> > PluggableSVIShoutMapMorph>>preStyleText
> >        ...
> >        basicStyle: (aText _ styler basicFormat: t asText).
> >
> > Where styler is an instance of SHTextStylerST80. Problem is it has no
> > basicFormat method. The only reference to a basicFOrmat method via
> > google is:
> >
> > http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-April/077901.html
> >
> > which is hardly useful in this case, although it does point to the
> > function of the method.
>
> The basicFormat: method was removed from Shout some time ago.
> I had added the styledTextFor: to achieve the same purpose, and so your fix is a
> good one.
>
>
> >
> > Firstly, I seem to be able to emulate the intention of the code by
> > replacing PluggableSVIShoutMapMorph>>preStyleText with:
> >
> > preStyleText: t
> >
> >        |aText|
> >
> >        (Preferences syntaxHighlightingAsYouType not or: [t size > self
> > styleSizeLimit])
> >                ifTrue:[^t].
> >
> >        styler
> >                ifNil: [ ^t ]
> >                ifNotNil:[styler
> >                                        classOrMetaClass: svi
> > selectedClassOrMetaClass;
> >                                        format: (aText := styler
> > styledTextFor: t asText).
> >                                ^aText].
> >
> > This also points to a challenge that the ST community has with regards
> > to it's use of traditional SCM. Since most coding projects (say Rails)
> > use a "standard" text based SCM like CVS or subversion, they can run
> > simple web interfaces allowing access to all versions of all source
> > files. A huge benefit of that is that I can google for some class and
> > method names (that may be in either an upcoming version or may have
> > been deprecated years ago) and I will often find the source that
> > implements that method which is a good starting point, even if noone
> > has ever mentioned my specific issue.
> >
> > There don't seem to be any such online viewable repositories of, say,
> > the squeak core. Is there any kind of repositary that would be
> > suitable for putting a read only web front end on? Ideally with more
> > granularity than just the snapshots of released image versions.
>
> the code for Shout is on SqueakSource...
> http://www.squeaksource.com/shout.html
>
> Where all the old versions can be browsed/downloaded
>
> Cheers,
> Andy
>
> >
> > Cheers,
> >
> > Mark.
> >
> > --
> > Mark Aufflick
> >  e: [hidden email]
> >  w: mark.aufflick.com
> >  p: +61 438 700 647
> >  f: +61 2 9436 4737
> >
> >
>
>


--
Mark Aufflick
 e: [hidden email]
 w: mark.aufflick.com
 p: +61 438 700 647
 f: +61 2 9436 4737