How to load a property with an Array?

Jeanne A. E. DeVoto revolution at jaedworks.com
Thu Jul 15 11:41:02 EDT 2004


At 9:52 PM -0500 7/14/04, Michael D Mays wrote:
>Can I set an array directly into a custom property or do I have to 
>'combine' the array before setting it and then 'split' it after I 
>get it in order to use it as an array?

You can set it directly.

Technically, what you get in this case is a custom property set - 
with each element being a property in that set. But for your purposes 
the distinction doesn't matter, because you address the properties in 
a custom property set with array notation:

   set the customProperties["pets"] of this card to myPetInventory -- array
   put the pets["dog"] of this card into field "Number of Dogs"
   set the pets["cat"] of this card to 14
-- 
jeanne a. e. devoto ~ jaed at jaedworks.com
http://www.jaedworks.com


More information about the use-livecode mailing list