import snapshot crash...
David Glasgow
david at dvglasgow.wanadoo.co.uk
Thu Jan 12 14:41:24 EST 2006
Hello folks,
I left the organisation that licensed Rev 2.x for me, so I went back to
developing on my copy 1.1.1.
It wasn't as tough as you might think. I find myself to be a very
understanding boss ;-)
Anyway, I included in my 'new' 1.1.1 stack a button that will take a
snapshot of part of the current card. Works fine on stack and
standalone.
Then along comes the MacFormat CD with 2.2.1 on it. Yippee! So I
tried my 1.1.1 stack in 2.2.1 and the import snapshot script crashes
the IDE and an OS X standalone built containing it. This is the script
almost in its entirety:
get "Circres(charts("& "CChrt_" & the system date &"_"& the long time
& ".png"
replace "/" with "-" in it
replace ":" with "." in it
replace "(" with "/" in it
put it into tname
put the backgroundcolor of this card into tbcolour
set the backgroundcolor of this card to white
get the windowid of this stack
put the rect of grc "clipframe" into tbox
import snapshot from rect tbox of window it
select image 1 of this card
export png to file tname
delete the selectedobject
set the backgroundcolor of this card to tbcolour
send mouseup to button "show rest"
show field "export done"
wait 60 ticks
hide field "export done"
Using the debugger, everything seems OK 'til it hits the import
snapshot from rect tbox of window it
line, and then foom! I have checked the archives, and can see some old
(2001) posts, but no workarounds or fixes.
(using 2.2.1 on OS 10.3.9, 1 gig RAM)
Best Wishes,
David Glasgow
http://www.i-psych.co.uk
More information about the use-livecode
mailing list