CwPrinterPrompter & AbtReportPrinterPrompter - order and default printer

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

CwPrinterPrompter & AbtReportPrinterPrompter - order and default printer

Wayne Johnston
These classes are a prompter listing your machine's printers in the seemingly random order answered by the OS (I'm on Windows).  Why doesn't the code sort them alphabetically?  Also why isn't the default printer pre-selected?  It seems whatever printer is last is selected, though it may take scrolling in order to see that.

I assume it would be easy for me to subclass CwPrinterPrompter in order to get the behavior I want, and our code could reference that new class instead.

However, AbtReportPrinterPrompter is referenced explicitly from AbtReportPrinterPrompter which is referenced explicitly fromAbtReportPrinter, which our code references.  I'd need subclasses of all 3 with copies of non-trivial methods in order to get the behavior I want.

Of course it would be much easier to just change code in CwPrinterPrompter.  This should be fairly safe since it hasn't changed since version 5.5.

Comments, anyone?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CwPrinterPrompter & AbtReportPrinterPrompter - order and default printer

Ralf Helm

Hello Wayne,

it is much easier to write your own Prompter, I have make it, after 4h, all problems with CwPrinterPrompter are solved and no, I have not used CwPrinterPrompter as parent class, CwPrinterPrompter is simply programmed incorrectly. In this context, I have written my own methods to get the printer screen infos to save the printer settings I have made in the actual session.

Feature List: Sorted printer list, all printer are listet!, default printer is selected, next time you open the prompter last printer is selected and printer settings are still present.

Regards

Ralf

Am Dienstag, 10. Juni 2014 17:25:39 UTC+2 schrieb Wayne Johnston:

These classes are a prompter listing your machine's printers in the seemingly random order answered by the OS (I'm on Windows).  Why doesn't the code sort them alphabetically?  Also why isn't the default printer pre-selected?  It seems whatever printer is last is selected, though it may take scrolling in order to see that.

I assume it would be easy for me to subclass CwPrinterPrompter in order to get the behavior I want, and our code could reference that new class instead.

However, AbtReportPrinterPrompter is referenced explicitly from AbtReportPrinterPrompter which is referenced explicitly fromAbtReportPrinter, which our code references.  I'd need subclasses of all 3 with copies of non-trivial methods in order to get the behavior I want.

Of course it would be much easier to just change code in CwPrinterPrompter.  This should be fairly safe since it hasn't changed since version 5.5.

Comments, anyone?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CwPrinterPrompter & AbtReportPrinterPrompter - order and default printer

Wayne Johnston
In reply to this post by Wayne Johnston
Thanks Ralf.  I think that's what I'm going to do, make my own prompter.

(This became a support case, INST54850.  But Instantiations and I had some difficulty fixing the behavior with the CwPrinterPrompter class, maybe because of the 'primitive' way that UI is coded.  But coincidentally my project has a requirement which makes additional functionality desirable.  I'm going to implement that in our own prompter where it's easy enough to do all I hoped.  We happen to not need AbtReportPrinterPrompter changed.)

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.