inserting Data into CustomProp array
mwieder at ahsoftware.net
Sat Jan 30 12:05:32 EST 2016
On 01/30/2016 06:13 AM, Sannyasin Brahmanathaswami wrote:
> Property sets appear easer to get and set across “sessions” (different times during dev) than putting an array into a property. I don’t see you could set just one element of tArray if it was contained in a property without taking it out and putting it back in.
> Am I wrong?
I forget what the original problem was/is, but...
if you just want to store an array as a custom property of an object and
set and retrieve the elements, then the array itself becomes a
put the rect of the last image into tRect
set the uEffects["startsize"] of the last image to tRect
set the uEffects["name"] of the last image to "ganesha"
You now have a custompropertyset named "uEffects", and you can treat it
as a serialized array property of the image, or you can retrieve it as
an array and use it that way.
-- use individual elements
put the uEffects["startsize"] of image 1 into tNewRect
set the uEffects["towel"] of the last image to 42
-- get the entire array at once
put the uEffects of image 1 into tArray
ahsoftware at gmail.com
More information about the Use-livecode