Re: inserting Data into CustomProp array

2016-01-31 Thread Mark Wieder

On 01/30/2016 10:27 PM, Phil Davis wrote:



On 1/30/16 9:05 AM, Mark Wieder wrote:

-- get the entire array at once
put the uEffects of image 1 into tArray


And of course what you meant to say was:

 put the customProperties["uEffects"] of image 1 into tArray

:-)



Yeah, but hey... I was close...

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: inserting Data into CustomProp array

2016-01-30 Thread Mark Wieder

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 
custompropertyset:


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

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: inserting Data into CustomProp array

2016-01-30 Thread Sannyasin Brahmanathaswami
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?


On January 29, 2016 at 9:17:26 PM, J. Landman Gay 
(jac...@hyperactivesw.com) wrote:

If you want the array in a single custom property rather than in its own
property set, first create the array and then store it:

put the rect of the last image into tArray["startsize"]
set the uEffects of the last image to tArray

To get things back out:

put the uEffects of this cd into tArray
put tArray["startsize"]

Property sets work too, so it's mostly a matter of personal preference.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: inserting Data into CustomProp array

2016-01-30 Thread Phil Davis



On 1/30/16 9:05 AM, Mark Wieder wrote:

-- get the entire array at once
put the uEffects of image 1 into tArray


And of course what you meant to say was:

put the customProperties["uEffects"] of image 1 into tArray

:-)

--
Phil Davis


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: inserting Data into CustomProp array

2016-01-29 Thread Mark Wieder

On 01/29/2016 09:15 PM, Sannyasin Brahmanathaswami wrote:


OK… I’m good to good, but any advice in this area is appreciated.


That will do the trick.
An alternate way of retrieving the data is

set the custompropertyset of image  to "uMyEffects"
put the startsize of image 
set the custompropertyset of image  to empty

...and of course the same could be done for setting the custom property 
array.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: inserting Data into CustomProp array

2016-01-29 Thread J. Landman Gay

On 1/29/2016 11:15 PM, Sannyasin Brahmanathaswami wrote:

apparently this:


on mouseUp

put the rect of the last image into tRect

set the uMyEffects["startsize"] of the last image to tRect

CheckEffects

end mouseUp


created a custompropertyset


If you want the array in a single custom property rather than in its own 
property set, first create the array and then store it:


  put the rect of the last image into tArray["startsize"]
  set the uEffects of the last image to tArray

To get things back out:

  put the uEffects of this cd into tArray
  put tArray["startsize"]

Property sets work too, so it's mostly a matter of personal preference.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: inserting Data into CustomProp array

2016-01-29 Thread Sannyasin Brahmanathaswami
Hhmm serendipity happens

I was reading through all the dict entries on customproperties and custom 
property sets… a bit esoteric at first.

There was no explicity guide “how to create a custompropertyset”

But when I went back to my image and check… apparently this:


on mouseUp

   put the rect of the last image into tRect

   set the uMyEffects["startsize"] of the last image to tRect

   CheckEffects



end mouseUp


created a custompropertyset


and this extracts it


command CheckEffects

   put the customProperties["uMyEffects"] of the last image into tEffects

   put the keys of tEffects

end CheckEffects


OK… I’m good to good, but any advice in this area is appreciated.



http://www.himalayanacademy.com/apps/gurudeva


On January 29, 2016 at 7:01:14 PM, Sannyasin Brahmanathaswami 
(bra...@hindu.org) wrote:

What is the best practice for progressively adding data to a customProperty 
that you want to be an array?  both inserting new keys into that property as 
well as changing values in the existing keys.

In this case i want an image(s) in a stack to have a custom property containing 
the necessary info for Animation Engine to do some effects. This seems like a 
good way to store this vs saving it anywhere else.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode