Printing issue - from Windows, anyway
Barry Levine
themacguy at macosx.com
Fri Jun 11 02:57:05 EDT 2004
I have a stack that has some image and player objects, and some
buttons. There are 20+ cards in the stack similarly populated. When I
print the cards in the stack, I hide and show some objects just for the
printing and then restore them back to the pre-printing state.
My script is a loop in this pseudocode manner:
repeat with i = 1 to the number of cards
hide (thisStuff)
show (thatStuff)
print card
hide (thatStuff)
show (thisStuff)
go next card
end repeat
What I've found happens (in Windows Rev, anyway) is that the printed
cards fail to show "thatStuff" and "thisStuff" except on the first
card. Additionally, after the printing is done, "thisStuff" fails to
re-appear on the cards and "thatStuff" will not programmatically appear
when called by a script. Furthermore, audio files referenced by a
player object do not play when scripted to do so.
Here is where is gets really hairy, however. If I insert "wait .5
seconds" -before- the "print card" command, everything seems to print
properly. I am not using the "formatForPrinting" property (it's false)
as that has bitten me badly in the recent past.
I am wondering if there is some reason that I should loop through the
cards three times; once to hide/show the objects, again to print, and a
third time to restore the objects original visibility. I mean not just
because it might work better but if there's a logical reason having
something to do with a Rev requirement rather than simply another
WinRev bug. I originally had done the three loops because the older
version of Rev would crash if you attempted to print a card containing
a visible player object. I had to take a shot of the object, position
it properly, hide the player object (along with the other stuff),
(repeat through all the cards), print the cards, and loop again to
delete the image and make the player object visible again.
BTW - No problem on OSX without the "wait" command. I hate Windows.
*sigh*
Barry
More information about the use-livecode
mailing list