[squeak-dev] The Trunk: Collections-dtl.548.mcz
Frank Shearar
frank.shearar at gmail.com
Fri Dec 13 07:42:28 UTC 2013
On 12 December 2013 23:58, <commits at source.squeak.org> wrote:
> David T. Lewis uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-dtl.548.mcz
>
> ==================== Summary ====================
>
> Name: Collections-dtl.548
> Author: dtl
> Time: 12 December 2013, 6:58:08.878 pm
> UUID: b167353b-b9ab-4911-8168-c5f184cab62a
> Ancestors: Collections-ul.547
>
> Transcripter>>initInFrame: should do nothing when not in MVC
>
> =============== Diff against Collections-ul.547 ===============
>
> Item was changed:
> ----- Method: Transcripter>>initInFrame: (in category 'initialization') -----
> initInFrame: rect
> + Smalltalk at: #Paragraph ifPresent: [:classParagraph | "MVC"
> + frame := rect insetBy: 2. "Leave room for border"
> + para := classParagraph withText: self contents asText
> + style: TextStyle default
> + compositionRectangle: ((frame insetBy: 4) withHeight: 9999)
> + clippingRectangle: frame
> + foreColor: self black backColor: self white]!
> - frame := rect insetBy: 2. "Leave room for border"
> - (Smalltalk hasClassNamed: #Paragraph)
> - ifFalse: [^ self inform: 'MVC class Paragraph not present'].
> - para := (Smalltalk at: #Paragraph) withText: self contents asText
> - style: TextStyle default
> - compositionRectangle: ((frame insetBy: 4) withHeight: 9999)
> - clippingRectangle: frame
> - foreColor: self black backColor: self white!
Well, that definitely stops a DNU and such when running in Morphic
(yay!) but it still won't work in a non-MVC/Morphic world. That's when
you accused me of overengineering, David :) It is a nice example of
using #at:ifPresent though - we don't make enough use of that idiom,
IMO.
frank
More information about the Squeak-dev
mailing list
|