PRINTING IN RUNREV 2.9

Sarah Reichelt sarah.reichelt at gmail.com
Mon Apr 28 17:50:44 EDT 2008


Printing has changed a lot in 2.9 and in my opinion, for the better.
Since it seems to be an issue of some confusion, I thought I would
chime in here with my experiences.

There is a large list of new commands and functions for setting up
your printing, querying printers, storing print setups etc. If you
read the "Engine Change Log.txt" file in the Revolution application
folder you will find these all gathered together.

There has been one change in existing syntax and while I think it has
become more logical, a change is always confusing at first. Previously
the command "answer printer" would bring up the Page Setup dialog. In
order to get to the Print dialog, you had to use "revShowPrintDialog
false, true" or "open printing with dialog". Both of these still work
and "revShowPrintDialog true, true" will show both the Page Setup &
Print dialogs.

However we now have another command "answer page setup", which shows
the Page Setup dialog and "answer printer" has been changed to show
the Print dialog. If your apps used "answer printer", then you will
need to edit that.

The really great thing is that we can now store the results of these 2
dialogs. After either of these dialogs is closed, unless they have
been cancelled, the printerSettings is updated to hold the settings.
This setup data can be stored in a custom property and re-applied
without having to ask the user again. For example, I have an
application that uses a regular printer and a special label printer.
The application knows which one is to be used at any time, but
previously, I had to ask the users to set the page setup & print
settings every time the printer had to change. Now I can store these
settings the first time they use them and then just re-apply those
settings when the relevant printer is needed.

If you need to set any print settings like page ranges, number of
copies etc., do not then show either the Page Setup or Print dialogs
as they will override whatever special settings you used.

One final point: Bill mentioned the systemPrintSelector. The
newsletter article suggests setting this to false so that Rev's own
print & page setup dialogs are used instead of the system ones. While
this is instructive while testing, I don't like the idea for a
released application and I think it is unnecessary, certainly on a
Mac. If you get your users to go through Page setup & Print once, then
you have all the data you need. You can set any further parameters you
want programmatically.

Regards,
Sarah



More information about the use-livecode mailing list