Rev Crash Again! ... cardImage() function

Wouter wouter.abraham at pi.be
Fri Jan 9 17:00:19 EST 2004


On 09 Jan 2004, at 22:04, use-revolution-request at lists.runrev.com wrote:

> Message: 9
> Date: Fri, 9 Jan 2004 14:02:42 -0700
> From: Dar Scott <dsc at swcp.com>
> Subject: Re: Rev Crash Again!  ... cardImage() function
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <2A7F9EF0-42E7-11D8-AA02-000A9567A3E6 at swcp.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>
> On Friday, January 9, 2004, at 05:10 AM, Wouter wrote:
>
>> #### = changed
>> function cardImage theStack ####
>>   local tCurrentCardImage, tOldBuffer, tID
>>   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 ### not really needed
>>     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
else
answer "No picture data could be obtained" with "Sorry"
exit to metacard
end if

>>   return tCurrentCardImage
>> end cardImage
>
> I like it!  Maybe theStack can be made optional, too.  If so, should it
> be defaultStack or topStack?
>
> Anybody have ideas on specifying the card?
>
> Dar Scott
>

That depends on the application of this handler. Your choice :^)

But anyway, the buggyness was ours.
Though some more  elaborate elucidation on this kind of things
in the TD would not be a luxury.

A happy man greeting,
WA






More information about the use-livecode mailing list