custom props woes

Peter Haworth pete at lcsql.com
Fri Oct 18 19:47:44 EDT 2013


Hi Klaus,
Glad you have a workaround.

I can't help thinking that the contents of tseconds are not what you
expect, but I'm sure you've checked that

Pete
lcSQL Software
On Oct 18, 2013 6:59 PM, "Klaus major-k" <klaus at major-k.de> wrote:

> Hi Pete,
>
> Am 18.10.2013 um 22:52 schrieb Peter Haworth <pete at lcsql.com>:
>
> > It sounds like tcpname is being treated as a custom property name rather
> > than a variable containing the custom property name., although not sure
> why
> > that would be.
>
> Nope, see my last response to Richard:
> ...
> 2. If I change the content of that CP to a string ("a string") then I get
> that string!
> ...
>
> > I suppose you could:
> > do "put the c" & tseconds && "of me into tarray"
>
> Also tried that without success :-/
>
> Anyway, I have a workaround, thanks :-)
>
> > Pete
> > lcSQL Software
>
> > On Oct 18, 2013 9:31 AM, "Klaus major-k" <klaus at major-k.de> wrote:
> >
> >> 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
> >> ...
>
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list