Rev Crash Again! ... cardImage() function

Dar Scott dsc at swcp.com
Fri Jan 9 18:48:37 EST 2004


On Friday, January 9, 2004, at 04:26 PM, Alejandro Tejada wrote:

> function cardsImage theStack theCard   -- ****
>   local tCurrentCardImage, tOldBuffer, tID
>   put the topstack into qwerty         -- ****
>   lock screen                          -- ****
>   go to card theCard of stack thestack -- ****

Should the body of this function go here?

And then "go back"?

>   toplevel qwerty                      -- ****

Is this
>   unlock screen                        -- ****
>  put the alwaysBuffer of stack theStack into
> tOldBuffer
>  put the cantmodify of stack theStack into
> tCMOldBuffer
>   set the cantmodify of  stack theStack to false
>   set the alwaysBuffer of  stack theStack to false
>   set the alwaysBuffer of stack theStack to true
>   put the windowID of stack theStack into wID
>   put the pixMapID of  stack theStack into pID
>   if not ((pID is wID) or (pID is 0)) then
>     create invisible image
>     put the imagePixMapID of last image into tID
> set the imagePixMapID of last image to (the pixMapID
> of stack theStack)
>     export last image to tCurrentCardImage as PNG
>     set the imagePixMapID of last image to tID
>     set the alwaysBuffer of stack theStack to false
> set the cantmodify of stack theStack to tCMOldBuffer
>     delete last image
>   end if
>   return tCurrentCardImage
> end cardsImage

Will all this restore defaultStack, too?

If "go to" is used, then maybe the a function that calls the older 
smaller function might be used; the stack references in the body of 
this might not be needed.

If "go to" goes to a card and the stack is already there, are there 
messages?

Progress!

Dar Scott



More information about the use-livecode mailing list