formatForPrinting bug?

Chipp Walters chipp at chipp.com
Wed Mar 16 03:35:49 EST 2005


Dwayne,

 From the documentation:

"Comments:
...For the best appearance of printed cards in a stack, make sure the 
stack is closed (and not in memory), then set the stack's 
formatForPrinting property to true before opening the stack to print it."
(not exactly sure HOW one does this with the stack NOT being in memory;-)

"Important!  Do not edit field text in a stack whose formatForPrinting 
is true. Doing so can cause display anomalies. Set the formatForPrinting 
property to false before you make changes to text in fields."

So, you should set the formatForPrinting to true, save the stack, then 
(if it's a main stack) delete the stack (will purge it from memory), 
then open it for printing.

I, too, have experienced crashes and abnormal behavior when using 
formatForPrinting, but when I do the above, I don't have problems.

-Chipp



Dwayne Rothe wrote:
> Hi All,
> Using the formatForPrinting handler in Win 9x/ME cause the app to quit.
> Other Win OS are ok.
> If I comment out "set formatForPrinting of this stack to TRUE" all works
> fine on all Win OS.
> 
> The handler I am using is written below:
> ================================================
> on printIt
> set formatForPrinting of this stack to TRUE
> answer printer --show print dialog
> if hilite of btn "a4" of stack "printing" is TRUE then
> print cd 1 of this stack into 0,0,595,842 --A4 (210mm x 297mm)
> else
> print cd 1 of this stack into 0,0,612,792 --Letter (8.5" x 11")
> end if
> close this stack
> set formatForPrinting of this stack to FALSE
> end printIt
> ================================================
> 
> This is not a major concern as all printing displays identical with or
> without setting it!
> However, this may be an issue with other printing preferences, property
> settings e.t.c
> 
> Has anyone else experienced this crash?
> 
> Cheers Dwayne.....
> 
> p.s I am using Rev 2.51, I have not tested this with prior versions.
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 


More information about the use-livecode mailing list