[squeak-dev] The Trunk: Morphic-dtl.997.mcz

David T. Lewis lewis at mail.msen.com
Mon Aug 24 11:41:52 UTC 2015


On Mon, Aug 24, 2015 at 11:42:58AM +0200, Levente Uzonyi wrote:
> Hi Dave,
> 
> I think this method belongs to Editor instead of TextEditor.
> 
> Levente

I was not sure which was best. Most of the "menu messages" are in
TextEditor, so I added the new one there for consistency. But as you
say, Editor seems like a better place for them.

Dave

> 
> On Mon, 24 Aug 2015, commits at source.squeak.org wrote:
> 
> >David T. Lewis uploaded a new version of Morphic to project The Trunk:
> >http://source.squeak.org/trunk/Morphic-dtl.997.mcz
> >
> >==================== Summary ====================
> >
> >Name: Morphic-dtl.997
> >Author: dtl
> >Time: 23 August 2015, 9:32:02.122 pm
> >UUID: e66cf3fd-1cd2-42c6-9fe2-c745eb1f688c
> >Ancestors: Morphic-topa.996
> >
> >Workspace "Send contents to printer" works in MVC, not in Morphic, due to 
> >missing implementation in the new Editor hierarchy. Add 
> >TextEditor>>sendContentsToPrinterWithLabel: for use with 
> >PluggableTextMorph.
> >
> >=============== Diff against Morphic-topa.996 ===============
> >
> >Item was changed:
> > ----- Method: PluggableTextMorph>>sendContentsToPrinter (in category 
> > 'menu commands') -----
> > sendContentsToPrinter
> >+ 	self handleEdit: [textMorph editor sendContentsToPrinterWithLabel: 
> >owner knownName]!
> >- 	self handleEdit: [textMorph editor sendContentsToPrinter]!
> >
> >Item was added:
> >+ ----- Method: TextEditor>>sendContentsToPrinterWithLabel: (in category 
> >'menu messages') -----
> >+ sendContentsToPrinterWithLabel: label
> >+ 	| textToPrint printer |
> >+ 	textToPrint := paragraph text.
> >+ 	textToPrint size = 0 ifTrue: [^self inform: 'nothing to print.'].
> >+ 	printer := TextPrinter defaultTextPrinter.
> >+ 	printer documentTitle: (label ifNil: ['Untitled']).
> >+ 	printer printText: textToPrint!
> >
> >
> >


More information about the Squeak-dev mailing list