<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 23, 2015 at 4:43 PM, Kirk Fraser <span dir="ltr">&lt;<a href="mailto:overcomer.man@gmail.com" target="_blank">overcomer.man@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Several different things are polymorphically called print.  How do I send text to a peripheral printer?  I found the menu item &quot;Send contents to printer&quot; and it produced walkback which says &quot;MessageNotUnderstood: SmalltalkEditor&gt;sendContentsToPrinter&quot;.  Printer setup similarly failed yet after the OS supplied the customary sound that the printer was hooked up.<div><br></div><div>This occurred in Squeak 4.5 under Windows 7.  What would solve the problem best?  Upgrading Squeak?  Getting a different printer? Going back to Digitalk Smalltalk/V and a dot matrix ribbon printer where it did work years ago?  </div><span class=""><font color="#888888"><div><br></div><div>Kirk</div></font></span></div></blockquote><div><br></div><div>Hi Kirk,</div><div>You can fix this by copying the following into the SmalltalkEditor class.</div><div><br></div><div>sendContentsToPrinter</div><div><span class="" style="white-space:pre">        </span>| textToPrint printer parentWindow |</div><div><span class="" style="white-space:pre">        </span>textToPrint := paragraph text.</div><div><span class="" style="white-space:pre">        </span>textToPrint size = 0 ifTrue: [^self inform: &#39;nothing to print.&#39;].</div><div><span class="" style="white-space:pre">        </span>printer := TextPrinter defaultTextPrinter.</div><div><span class="" style="white-space:pre">        </span>parentWindow := self model dependents </div><div><span class="" style="white-space:pre">                                </span>detect: [:dep | dep isSystemWindow]</div><div><span class="" style="white-space:pre">                                </span>ifNone: [nil].</div><div><span class="" style="white-space:pre">        </span>parentWindow isNil </div><div><span class="" style="white-space:pre">                </span>ifTrue: [printer documentTitle: &#39;Untitled&#39;]</div><div><span class="" style="white-space:pre">                </span>ifFalse: [printer documentTitle: parentWindow label].</div><div><span class="" style="white-space:pre">        </span>printer printText: textToPrint</div><div><br></div><div>this will send the contents of an editor pane to the connected (default) printer.  If you need to change the printer, you can go to the outside top left icon (mouse), choose VM Preferences-&gt;System Preferences-&gt;Printer Configuration.</div><div><br></div><div>The above message also shows how to programmatically interface with the printer.</div><div><br></div><div>-cbc</div></div></div></div>