2.0 rc1: print screens bug (the case of the missing checkmarks)
Alex Rice
alrice at ARCplanning.com
Sat May 10 03:18:01 EDT 2003
This bug is verified on OS X and Win2K, Rev 1.1.1 and 2.0 rc1. In both
the IDE and in standalone apps. I am hoping it's a problem with my
code, but I don't think so. The problem is: when the screens are
printed with the handler below, the checkbox are rendered without their
"mark" and sometimes without their "box". The checkbox labels are
correct. Radio buttons and other controls appear correct. Here is a
recipe for the bug. Sorry I didn't have time to simplify the handler
more. I wanted to make sure I asked about this while 2.0 is still being
finalized.
Thanks --Alex
--
-- printScreensDBug handler
-- 1) create stack with 2 cards
-- 2) put checkboxes on each card and "check" some of them
-- 3) put this handler in the stack
-- 4) do printScreensDBug in the message box
--
on printScreensDBug
set the cursor to watch
lock messages
new invisible stack "PrintScreens"
set the destroyStack of stack "PrintScreens" to true
set the alwaysBuffer of stack "PrintScreens" to false
set the width of stack "PrintScreens" to the width of this stack
set the height of stack "PrintScreens" to the height of this stack
repeat with tCardNumber = 1 to the number of cards in this stack
copy card tCardNumber of this stack to stack "PrintScreens"
end repeat
delete card 1 of stack "PrintScreens"
--
-- you might be wondering why the PrintScreens stack is needed.
-- it's to allow the the formatForPrinting operation on Win32.
-- I know it's a waste to do this on mac, but the customer is win32
only.
--
if the platform = "Win32" then
put "tmp.rev" into tFilename
save stack "PrintScreens" as tFilename
close stack "PrintScreens"
set the formatForPrinting of stack tFilename to true
go stack tFilename
end if
answer printer
if the result = "Cancel" then
exit printScreensDBug
end if
put item 1 of the printPaperSize into tImgWidth
put item 2 of the printPaperSize into tImgHeight
put item 1 of the printMargins into tLeftMargin
put item 3 of the printMargins into tRightMargin
put the width of this stack into tMyWidth
put tImgWidth - tLeftMargin - tRightMargin into tImgWidth
if tMyWidth > tImgWidth then
put tImgWidth / tMyWidth into tScale
set the printScale to tScale
end if
set the printCardBorders to "true"
if the platform = "MacOS" then
open printing with dialog
if the result = "Cancel" then
exit printScreensDBug
end if
else
open printing
end if
print stack "PrintScreens"
close printing
close stack "PrintScreens"
delete file tFilename
end printScreensDBug
Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alrice at ARCplanning.com
alrice at swcp.com
More information about the use-livecode
mailing list