Accessing imbedded custom properties (or other variables for that matter)

Dave Cragg dcragg at lacscentre.co.uk
Wed Oct 13 02:37:50 EDT 2004


On 13 Oct 2004, at 03:10, Alan Gayne wrote:

> 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?
>

You can use a varaible directly for a custom property name.

     put "cMyData_" & item 1 of the long date into myPropName
     set the myPropName of this card to 1234

Cheers
Dave



More information about the use-livecode mailing list