How do I print?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I print?

Kirk Fraser
Several different things are polymorphically called print.  How do I send text to a peripheral printer?  I found the menu item "Send contents to printer" and it produced walkback which says "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer setup similarly failed yet after the OS supplied the customary sound that the printer was hooked up.

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?  

Kirk

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

David T. Lewis
On Sun, Aug 23, 2015 at 04:43:12PM -0700, Kirk Fraser wrote:

> Several different things are polymorphically called print.  How do I send
> text to a peripheral printer?  I found the menu item "Send contents to
> printer" and it produced walkback which says
> "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer
> setup similarly failed yet after the OS supplied the customary sound that
> the printer was hooked up.
>
> 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?

Hi Kirk,

That MessageNotUnderstood is a bug for sure. I'm surprised nobody spotted
the MNU until now; I suspect that it has been broken for quite a while.

I'm afraid that this is negected functionality. As a workaround, there are
various ways to export to files which can then be printed. The contents of
a workspace can be exported to a text file, and any morph can exported in
various ways (included postscript) by means of the tools button in morph
halo menus (yellow click on any morph).

Dave

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

David T. Lewis
On Sun, Aug 23, 2015 at 08:20:13PM -0400, David T. Lewis wrote:

> On Sun, Aug 23, 2015 at 04:43:12PM -0700, Kirk Fraser wrote:
> > Several different things are polymorphically called print.  How do I send
> > text to a peripheral printer?  I found the menu item "Send contents to
> > printer" and it produced walkback which says
> > "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer
> > setup similarly failed yet after the OS supplied the customary sound that
> > the printer was hooked up.
> >
> > 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?
>
> Hi Kirk,
>
> That MessageNotUnderstood is a bug for sure. I'm surprised nobody spotted
> the MNU until now; I suspect that it has been broken for quite a while.
>
> I'm afraid that this is negected functionality. As a workaround, there are
> various ways to export to files which can then be printed. The contents of
> a workspace can be exported to a text file, and any morph can exported in
> various ways (included postscript) by means of the tools button in morph
> halo menus (yellow click on any morph).
>

Sorry, I guess that would be the blue button (not yellow) that brings up
the morph halos.

Dave
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

Kirk Fraser
David, 

Thanks for the tip to create a file and print with external tools.  I need to write a program to extract PO Boxes from a county voter list to send out post cards inviting each voter to sign my petition in a central location at one minute intervals to reduce the crowds. One of them will be to term limit the local mayor.  So I thought to generate the cards one at a time but your way can work.  
Kirk



On Sun, Aug 23, 2015 at 5:25 PM, David T. Lewis <[hidden email]> wrote:
On Sun, Aug 23, 2015 at 08:20:13PM -0400, David T. Lewis wrote:
> On Sun, Aug 23, 2015 at 04:43:12PM -0700, Kirk Fraser wrote:
> > Several different things are polymorphically called print.  How do I send
> > text to a peripheral printer?  I found the menu item "Send contents to
> > printer" and it produced walkback which says
> > "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer
> > setup similarly failed yet after the OS supplied the customary sound that
> > the printer was hooked up.
> >
> > 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?
>
> Hi Kirk,
>
> That MessageNotUnderstood is a bug for sure. I'm surprised nobody spotted
> the MNU until now; I suspect that it has been broken for quite a while.
>
> I'm afraid that this is negected functionality. As a workaround, there are
> various ways to export to files which can then be printed. The contents of
> a workspace can be exported to a text file, and any morph can exported in
> various ways (included postscript) by means of the tools button in morph
> halo menus (yellow click on any morph).
>

Sorry, I guess that would be the blue button (not yellow) that brings up
the morph halos.

Dave
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

David T. Lewis
I just committed a fix for this in Squeak trunk. I don't have a Windows
machine to test it with, but if you are able to update to the latest
Squeak trunk, please give it a try and let me know it it works for you.
Note that this is rather old code with platform dependencies, so I really
cannot say if it is going to work.

The underlying problem was that the editor hierarchy had been refactored
for Morphic a few years ago, and this particular feature was overlooked.
I added the missing implementation.

Dave


On Sun, Aug 23, 2015 at 05:32:27PM -0700, Kirk Fraser wrote:

> David,
>
> Thanks for the tip to create a file and print with external tools.  I need
> to write a program to extract PO Boxes from a county voter list to send out
> post cards inviting each voter to sign my petition in a central location at
> one minute intervals to reduce the crowds. One of them will be to term
> limit the local mayor.  So I thought to generate the cards one at a time
> but your way can work.
> Kirk
>
>
>
> On Sun, Aug 23, 2015 at 5:25 PM, David T. Lewis <[hidden email]> wrote:
>
> > On Sun, Aug 23, 2015 at 08:20:13PM -0400, David T. Lewis wrote:
> > > On Sun, Aug 23, 2015 at 04:43:12PM -0700, Kirk Fraser wrote:
> > > > Several different things are polymorphically called print.  How do I
> > send
> > > > text to a peripheral printer?  I found the menu item "Send contents to
> > > > printer" and it produced walkback which says
> > > > "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer
> > > > setup similarly failed yet after the OS supplied the customary sound
> > that
> > > > the printer was hooked up.
> > > >
> > > > 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?
> > >
> > > Hi Kirk,
> > >
> > > That MessageNotUnderstood is a bug for sure. I'm surprised nobody spotted
> > > the MNU until now; I suspect that it has been broken for quite a while.
> > >
> > > I'm afraid that this is negected functionality. As a workaround, there
> > are
> > > various ways to export to files which can then be printed. The contents
> > of
> > > a workspace can be exported to a text file, and any morph can exported in
> > > various ways (included postscript) by means of the tools button in morph
> > > halo menus (yellow click on any morph).
> > >
> >
> > Sorry, I guess that would be the blue button (not yellow) that brings up
> > the morph halos.
> >
> > Dave
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >

> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

Kirk Fraser
Dave,

Not sure what you mean by trunk.  I assumed it was the first download on squeak.org but it seems a lot harder to extract than Squeak 4.5 was.  Anyway it did not work any better on the menu print.

Kirk



On Sun, Aug 23, 2015 at 6:40 PM, David T. Lewis <[hidden email]> wrote:
I just committed a fix for this in Squeak trunk. I don't have a Windows
machine to test it with, but if you are able to update to the latest
Squeak trunk, please give it a try and let me know it it works for you.
Note that this is rather old code with platform dependencies, so I really
cannot say if it is going to work.

The underlying problem was that the editor hierarchy had been refactored
for Morphic a few years ago, and this particular feature was overlooked.
I added the missing implementation.

Dave


On Sun, Aug 23, 2015 at 05:32:27PM -0700, Kirk Fraser wrote:
> David,
>
> Thanks for the tip to create a file and print with external tools.  I need
> to write a program to extract PO Boxes from a county voter list to send out
> post cards inviting each voter to sign my petition in a central location at
> one minute intervals to reduce the crowds. One of them will be to term
> limit the local mayor.  So I thought to generate the cards one at a time
> but your way can work.
> Kirk
>
>
>
> On Sun, Aug 23, 2015 at 5:25 PM, David T. Lewis <[hidden email]> wrote:
>
> > On Sun, Aug 23, 2015 at 08:20:13PM -0400, David T. Lewis wrote:
> > > On Sun, Aug 23, 2015 at 04:43:12PM -0700, Kirk Fraser wrote:
> > > > Several different things are polymorphically called print.  How do I
> > send
> > > > text to a peripheral printer?  I found the menu item "Send contents to
> > > > printer" and it produced walkback which says
> > > > "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer
> > > > setup similarly failed yet after the OS supplied the customary sound
> > that
> > > > the printer was hooked up.
> > > >
> > > > 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?
> > >
> > > Hi Kirk,
> > >
> > > That MessageNotUnderstood is a bug for sure. I'm surprised nobody spotted
> > > the MNU until now; I suspect that it has been broken for quite a while.
> > >
> > > I'm afraid that this is negected functionality. As a workaround, there
> > are
> > > various ways to export to files which can then be printed. The contents
> > of
> > > a workspace can be exported to a text file, and any morph can exported in
> > > various ways (included postscript) by means of the tools button in morph
> > > halo menus (yellow click on any morph).
> > >
> >
> > Sorry, I guess that would be the blue button (not yellow) that brings up
> > the morph halos.
> >
> > Dave
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >

> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

Hannes Hirzel
Did you go for this

http://build.squeak.org/job/SqueakTrunk/lastSuccessfulBuild/artifact/target/TrunkImage.zip

?

On 8/24/15, Kirk Fraser <[hidden email]> wrote:

> Dave,
>
> Not sure what you mean by trunk.  I assumed it was the first download on
> squeak.org but it seems a lot harder to extract than Squeak 4.5 was.
> Anyway it did not work any better on the menu print.
>
> Kirk
>
>
>
> On Sun, Aug 23, 2015 at 6:40 PM, David T. Lewis <[hidden email]>
> wrote:
>
>> I just committed a fix for this in Squeak trunk. I don't have a Windows
>> machine to test it with, but if you are able to update to the latest
>> Squeak trunk, please give it a try and let me know it it works for you.
>> Note that this is rather old code with platform dependencies, so I really
>> cannot say if it is going to work.
>>
>> The underlying problem was that the editor hierarchy had been refactored
>> for Morphic a few years ago, and this particular feature was overlooked.
>> I added the missing implementation.
>>
>> Dave
>>
>>
>> On Sun, Aug 23, 2015 at 05:32:27PM -0700, Kirk Fraser wrote:
>> > David,
>> >
>> > Thanks for the tip to create a file and print with external tools.  I
>> need
>> > to write a program to extract PO Boxes from a county voter list to send
>> out
>> > post cards inviting each voter to sign my petition in a central
>> > location
>> at
>> > one minute intervals to reduce the crowds. One of them will be to term
>> > limit the local mayor.  So I thought to generate the cards one at a
>> > time
>> > but your way can work.
>> > Kirk
>> >
>> >
>> >
>> > On Sun, Aug 23, 2015 at 5:25 PM, David T. Lewis <[hidden email]>
>> wrote:
>> >
>> > > On Sun, Aug 23, 2015 at 08:20:13PM -0400, David T. Lewis wrote:
>> > > > On Sun, Aug 23, 2015 at 04:43:12PM -0700, Kirk Fraser wrote:
>> > > > > Several different things are polymorphically called print.  How
>> > > > > do
>> I
>> > > send
>> > > > > text to a peripheral printer?  I found the menu item "Send
>> contents to
>> > > > > printer" and it produced walkback which says
>> > > > > "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".
>> Printer
>> > > > > setup similarly failed yet after the OS supplied the customary
>> sound
>> > > that
>> > > > > the printer was hooked up.
>> > > > >
>> > > > > 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?
>> > > >
>> > > > Hi Kirk,
>> > > >
>> > > > That MessageNotUnderstood is a bug for sure. I'm surprised nobody
>> spotted
>> > > > the MNU until now; I suspect that it has been broken for quite a
>> while.
>> > > >
>> > > > I'm afraid that this is negected functionality. As a workaround,
>> there
>> > > are
>> > > > various ways to export to files which can then be printed. The
>> contents
>> > > of
>> > > > a workspace can be exported to a text file, and any morph can
>> exported in
>> > > > various ways (included postscript) by means of the tools button in
>> morph
>> > > > halo menus (yellow click on any morph).
>> > > >
>> > >
>> > > Sorry, I guess that would be the blue button (not yellow) that brings
>> up
>> > > the morph halos.
>> > >
>> > > Dave
>> > > _______________________________________________
>> > > Beginners mailing list
>> > > [hidden email]
>> > > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>> > >
>>
>> > _______________________________________________
>> > Beginners mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
cbc
Reply | Threaded
Open this post in threaded view
|

Re: How do I print?

cbc
In reply to this post by Kirk Fraser

On Sun, Aug 23, 2015 at 4:43 PM, Kirk Fraser <[hidden email]> wrote:
Several different things are polymorphically called print.  How do I send text to a peripheral printer?  I found the menu item "Send contents to printer" and it produced walkback which says "MessageNotUnderstood: SmalltalkEditor>sendContentsToPrinter".  Printer setup similarly failed yet after the OS supplied the customary sound that the printer was hooked up.

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?  

Kirk

Hi Kirk,
You can fix this by copying the following into the SmalltalkEditor class.

sendContentsToPrinter
| textToPrint printer parentWindow |
textToPrint := paragraph text.
textToPrint size = 0 ifTrue: [^self inform: 'nothing to print.'].
printer := TextPrinter defaultTextPrinter.
parentWindow := self model dependents 
detect: [:dep | dep isSystemWindow]
ifNone: [nil].
parentWindow isNil 
ifTrue: [printer documentTitle: 'Untitled']
ifFalse: [printer documentTitle: parentWindow label].
printer printText: textToPrint

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->System Preferences->Printer Configuration.

The above message also shows how to programmatically interface with the printer.

-cbc

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners