custom props woes

Klaus major-k klaus at major-k.de
Fri Oct 18 14:31:18 CEST 2013


Hi friends,

I have a big problem retrieving stored ARRAYS from custom properties,
any help much appreciated!

I store arrays in a custom property of a group, the key for them is ("c" & the seconds)
Works fine so far, but when I try to retrieve the data with a concatenated name of the
custom property, it does NOT work.
...
put ("c" & the Seconds) into tCPName
set the tCPName of me to tArray
## Works fine, cp contains the array!
...


The name is correct and it works when I use the name directly, but not this way:
...
## the seconds have of course been stored when saving to CP
put ("c" & tSeconds) into tCPName
## -> correct name of custom property
put the tCPName of me into tArray
##-> tArray = EMTPY!

put the c123456 of me into tArray
## -> tArray is an ARRAY
...

If I access the cp directly with its name, it works!?
I have been using this technique for years without problems, but it obviously does NOT works with arrays?! :-/


This DOES works if the data in the cp are NOT arrays:
...
## I set the cp cData of a button to the string -> data111
put ("c" & "Data") into tCP
answer the tCP of me
## -> data111
...

I am totally clueless :-/


Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de




More information about the use-livecode mailing list