import snapshot crash...

Eric Chatonet eric.chatonet at sosmartsoftware.com
Thu Jan 12 16:29:21 EST 2006


Hi David,

Sarah replied about the bug in Rev prior to 2.5.
The workaround I used at this time was to specify a globalRect  
without specifying the window ID:

   local tRect,tTopLeft,tBotRight, tGlobalRect
   -----
   put the rect of stack <stack name> into tRect
   put item 1 of tRect,item 2 of tRect into tTopLeft
   put item 3 of tRect,item 4 of tRect into tBotRight
   put globalLoc(tTopLeft),globalLoc(tBotRight) into tGlobalRect
   import snapshot from rect tGlobalRect

Best Regards from Paris,
Eric Chatonet

Le 12 janv. 06 à 20:41, David Glasgow a écrit :

> 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)

------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list