[ENH][Pref] acceptWithPrettyPrint

Stephan Rudlof sr at evolgo.de
Mon Apr 3 00:25:14 UTC 2000


Hello Torge,

your changeset has led me to the right idea. After some trial&error now
I have a working solution!
See my posting without 'Re:' (to get it into the update stream...).

Greetings,

Stephan

Torge Husfeldt wrote:
> 
> Hello Stephan.
> O.K. there are still problems with automaticly formatting a new method on
> accept.
> But as a first step we might allow the programmer to prettyPrint any
> not-yet-accepted
> text in the browser. Right now the menu-items prettyPrint and
> prettyPrintWithColor
> try to fetch the sourceCode first which is IMHO a Bad Idea(tm).
> 
> Gruss,
> Torge
> P.S.: maybe we can  put this on the first page of the menu (and maybe even
> assign a hotKey)?
> ----- Original Message -----
> From: Stephan Rudlof <sr at evolgo.de>
> To: ML Squeak <squeak at cs.uiuc.edu>
> Sent: Sunday, April 02, 2000 7:04 AM
> Subject: [ENH][Pref] acceptWithPrettyPrint
> 
> > Dear Squeakers,
> >
> > please don't use the previously posted 'acceptWithPrettyPrint' changeset
> > (see below)!
> >
> > It doesn't work as it should, if there are temps missing in the method
> > which has to be accepted. Possibly there are more errors.
> >
> > There doesn't seem to be an easy way to solve the problems:
> > Compiler>>format:in:notifying:decorated:
> > doesn't return the argument string fully formatted to give it so to
> > ClassDescription>>compile:classified:notifying:
> > then.
> > If using
> > Compiler>>format:in:notifying:decorated:
> > like in the changeset, then after formatting the correct, but
> > unformatted code is in the Browser and the formatted, but incorrect code
> > transfered to
> > ClassDescription>>compile:classified:notifying:
> > . That's bad!
> >
> > Some guys seem to work at Parser/prettyPrint tools - and now I think I
> > know, why! -, so I don't want to invest more time to solve these
> > problems.
> >
> > Stephan
> >
> > I wrote:
> > >
> > > "Change Set:            acceptWithPrettyPrint
> > > Date:                   1 April 2000
> > > Author:                 Stephan Rudlof
> > >
> > > This changeset introduces preference #acceptWithPrettyPrint.
> > > If set to true, browsers will automatically format their contents before
> > > accepting it (without color).
> > >
> > > This avoids unformatted sources.
> > >
> > > Often you type in a method on the fly and leave the formatting to the
> > > Browser by setting the preference #acceptWithPrettyPrint to true. But
> > > the sources remain ugly.
> > >
> > > Using this preference is simpler as using the menu methods 'pretty
> > > print' or 'pretty print with color'.
> > >
> > > In addition to the 'pretty print' menu methods formatting works also for
> > > new methods.
> > > "
> > >
> > > --
> > > Stephan Rudlof (sr at evolgo.de)
> > >    "Genius doesn't work on an assembly line basis.
> > >     You can't simply say, 'Today I will be brilliant.'"
> > >     -- Kirk, "The Ultimate Computer", stardate 4731.3
> > >
> >
>   ------------------------------------------------------------------------
> > >                                  Name: acceptWithPrettyPrint.1.cs
> > >    acceptWithPrettyPrint.1.cs    Type: unspecified type
> (application/octet-stream)
> > >                              Encoding: base64
> >
> > --
> > Stephan Rudlof (sr at evolgo.de)
> >    "Genius doesn't work on an assembly line basis.
> >     You can't simply say, 'Today I will be brilliant.'"
> >     -- Kirk, "The Ultimate Computer", stardate 4731.3
> >
> --
> Der Mensch kann wohl tun was er will,
> aber er kann nicht wollen was er will.
> 
>   ------------------------------------------------------------------------
>                              Name: acceptPrettyPrint.1.cs
>    acceptPrettyPrint.1.cs    Type: unspecified type (application/octet-stream)
>                          Encoding: quoted-printable

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list