[squeak-dev] Squeak 6 kernel changes, ContextPart+MethodContext -> Context
H. Hirzel
hannes.hirzel at gmail.com
Wed Mar 29 18:56:57 UTC 2017
Hi Eliot
Good catch.
As the method name #printString says it should return a string.
But
(super printString , ' [break]') asText allBold
returns an instance of the class Text which is wrong in this context.
What about just
super printString , ' [break]')
?
--Hannes
BTW the method has been there since 2007....
On 3/29/17, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> Hi All,
>
> another change planned for Squeak 6 is eliminating ContextPart &
> MethodContext in favor of Context. In reviewing the (very few) changes
> necessary I came across the following:
>
> MethodContext>>printString
> "Answer an emphasized string in case of a breakpoint method"
>
> ^(self method notNil and: [self method hasBreakpoint])
> ifTrue:[(super printString , ' [break]') asText allBold]
> ifFalse:[super printString]
>
> Seriously? I don't object to modifying [Method]Conext>>printOn: to include
> [break] but having printString answer a text seems completely broken to me,
> and overriding printString is a hack; printOn: being the operative method
> for producing self-descriptions. Should we nuke it and add [break] to
> printOn:? Or...?
>
> _,,,^..^,,,_
> best, Eliot
>
More information about the Squeak-dev
mailing list
|