I can create a stack, go to the stack, create a button, (and confirm that its there) but creating an image from that button (import snapshot from button "mybutton") causes the rest of my script to disappear into the ether. Commenting it out lets the rest of the script work. I can't even look at 'it' and 'the result' to see whats up. I do have inline debugging turned on.
Suggestions?
Heres a script explaining what I wish to do.
Code: Select all
<?lc set the errormode to "inline"?>
<pre>
<?lc
put version() && return -- this works
create stack "mytest" -- stack creation works.
go stack "mytest" -- as does this as shown by the next line
put the short name of the current stack --yep
create button "mybutton" -- also works as shown by next line
put the result
set the label of button "myButton" to "my test"
-- if I place a put here before the import,it also works.
import snapshot from button "myButton"
-- nothing past here is reached. If I comment out the import, then things are fine
put it & the result -- can't get the result cause apparently, server dies.
--If all worked well before, this would shove the pic data into a variable and encode it
put base64encode((the text of img 1)) into tPic
--Assuming we reached this stage,
--it would place an image onto the page (of the button)
--using the base64 encoded data. Since LC native format is png,
-- specify that as the mime type, and specify the base64 encoding.
put merge("<img alt=[[quote]][[quote]] src=[[quote]]data:image/png;base64,[[tPic]][[quote]] />")
?>