how to store imagedata in a custom property?

Scott Rossi scott at
Mon Jul 7 13:18:15 EDT 2008

Recently, Tiemo Hollmann TB wrote:

> I would like to make my
> own "undo" for painting actions with storing different states of the image
> in custom properties, like:
> set the undo1 of img "foo" to the imagedata of img "foo"
> but when trying to restore the imagedata out of the custom property undo1
> set the imagedata of img "foo" to the undo1 of img "foo"
> just nothing happens.

What you describe above works for me here in 2.9.

One other thing you might try.  Instead of storing the imageData, store the
text of the image.

  set the undo1 of img "foo" to the text of img "foo"

Then, to restore the image:

  set the text of img "foo" to the undo1 of img 1


Scott Rossi
Creative Director
Tactile Media, Multimedia & Design

More information about the use-livecode mailing list