Call for testing with 6.6.2 RC3
William Prothero
prothero at earthednet.org
Tue May 6 16:26:17 EDT 2014
Jacqueline:
The complete code to test snapShot in my test stack is below. It runs ok in LC 6.6, but fails in 6.6.2(RC3). I am testing it in the development environment. The snapshot will occasionally succeed but mostly fail.
Thanks for looking at this.
Bill
on mouseUp
randomizeBoxes
takeSnapShot "mySnapShot"
end mouseUp
local pBoxRect,pleft,pBottom,pRight,pTop,
on randomizeBoxes
put the rect of grc "pBox" into pBoxRect
put item 1 of pBoxRect into pleft
put item 2 of pBoxRect into pTop
put item 3 of pBoxRect into pRight
put item 4 of pBoxRect into pBottom
set the loc of grc "rect1" to randomLoc()
set the loc of grc "rect2" to randomLoc()
set the loc of grc "rect3" to randomLoc()
end randomizeBoxes
function randomLoc
put pRight - pLeft into pWid
put random(pWid) + pleft into xR
put pBottom - pTop into pHt
put random(pHt)+pTop into yR
return xr&","&yR
end randomLoc
on takeSnapShot mySnapShot
set the visible of img mySnapShot to FALSE
wait for 0 seconds with messages --in lc 6.6, if this statement is not here, the snapshot fails.
--This script fails in 6.6.2 (RC3).
put the rect of this stack into stackRect
put item 1 of stackRect + pLeft into xsLeft
put item 2 of stackRect + pTop into ysTop
put item 1 of stackRect + pRight - 1 into xsRight
put item 2 of stackRect + pBottom - 1 into ysBottom
put xsLeft&","&ysTop&","&xsRight&","&ysBottom into snapRect
--wait for 0.1 seconds with messages
try
export snapshot from rect snapRect to image mySnapShot
catch tError
answer tError
end try
--wait for 0 seconds
set the rect of image mySnapShot to the rect of grc "pBox" --now set the captured rect to the mapbox rect
--wait for 0 seconds with messages
set the visible of img mySnapShot to TRUE
end takeSnapShot
More information about the use-livecode
mailing list