Accessing imbedded custom properties (or other variables for that matter)
Alan Gayne
alanira9 at mac.com
Tue Oct 12 22:10:51 EDT 2004
Hi everybody,
I've been trying to access (get or set) the contents of custom
properties or other variables, the names of which are created or
selected on the fly by script control.
e.g.:
put "cMyData_" & item 1 of the long date into myPropName
So the value in the variable myPropName on Tuesday would be
"cMyData_Tuesday" but on Wednesday he value in the variable myPropName
would be
"cMyData_Wednesday"
Now on each day I want to save that day's data in the appropriate
custom property
i.e.: set the cMyData_Tuesday of this card to tuesdayData
However, the name of the custom property I want to set is in the
variable myPropName.
So how do I make the spontaneous contents of the variable myPropName
into the name of a property, the contents of which I want to get or
set?
Something like the following doesn't work
put "cMyData_" & item 1 of the long date into myPropName
set the (value of myPropName) of this stack to "1234"
get the (value of myPropName) of this stack
answer it
this brings up the following error message:
Error description: Properties: token is not a property
I'm pretty sure that there's a way to do what I want, but I can't
figure out how to skin this particular cat.
Any help will be appreciated.
Thanks in advance,
Alan
More information about the use-livecode
mailing list