background image
C H A P T E R 2 1
Routing Interface
Using Routing
data. That variable holds the printer selected by the user as the current printer. You
can use this function to obtain the current printer for the item:
item.printer := GetUserConfig('currentPrinter);
If you want to provide a way for the user to select a different printer, you can
use the printer chooser proto,
. This proto
changes the setting of the current printer in the system; it actually changes the
If you don't want to change the current printer in the user's system, but just want
to let them select a printer for this one print job, then you'll need to do the
following things:
1. Get and temporarily save the current value of the
variable in
the user configuration data, using
2. Display the printer chooser button, allowing the user to select a printer for this
print job. When they select one, the printer chooser proto automatically changes
variable to the chosen one.
3. Retrieve the new value of the
variable, using
, and use that for the
slot in the item frame.
4. Reset the user's original printer choice by resetting the
variable in the user configuration data to the value you saved in step 1. To do
this you must use the function
Opening a Routing Slip Programmatically
To open a routing slip programmatically for a transport, use the
function. First, create a new item by using the transport's
method; then
add routing information such as the recipient or other information to the new item
frame; and finally, use
to open the routing slip for the transport.
Here's an example of how to do these steps to open a routing slip for the built-in
Call transport:
// opening the Call Transport routing slip
local curs, item, anEntry, class, nameRef;
// get a new item frame from the transport
// '|phoneHome:Newton| identifies the Call transport
item := TransportNotify('|phoneHome:Newton|, 'NewItem, [nil]);
if item = 'noTransport or not item then
return 'noTransport;
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна