The latest PowerBuilder productivity enhancements will make our jobs as
developers easier and reduce development time. Among the many improvements in
PowerBuilder 8 are the additions to PowerScript of four printer functions
that support changing the default printer and its document properties. These
functions, printGetPrinter, printGetPrinters, printSetPrinter, and
printSetupPrinter, implement library routines that, in previous versions of
PowerBuilder, would have required external function calls or the use of
third-party products.
Let's begin this discussion with the two getter functions, printGetPrinter
and printGetPrinters. Both return tab-delimited strings containing the
printer, driver, and port names, allowing each to be easily loaded into a
DataWindow using the importString method (see Listing 1). The difference
between these functions is that printGetPrinte... (more)