how to get the value of a custom property if the name of the cProperty is in a variable?
bobsneidar at iotecdigital.com
Thu Aug 3 11:21:34 EDT 2017
If the handler is in the same script as the constant, why would you? A constant is for representing values that do not change after compile. Variables are for values that change during runtime. I cannot imagine a use case for putting a constant name into a variable, although I have thought about the need to get the constant from another script, until I remembered it's just easier to set a custom property.
In fact (I think I've said so before) custom props are a great way to mimic scoped variables, and even constants. For instance all my datagrids have a property tablename containing the name of the table I query to populate it.
> On Aug 2, 2017, at 10:20 , Matthias Rebbe via use-livecode <use-livecode at lists.runrev.com> wrote:
> let´s say a card has a custom property name cMyProp.
> The variable tMyVar contains the word “cMyProp”
> How do i get the value of the custom property using the variable tMyVar?
> Matthias Rebbe
More information about the Use-livecode