I'm trying to create a function that will change the labels of all buttons/fields with visible labels.
I thought I might be able to use "repeat for each", but it doesn't seem to work for objects.
For example, I store the English version of a button label as a custom property of the button, called cEnglish.
Code: Select all
put "c" & gNativeLanguage into tLanguage
repeat for each button tButton in card "dashboard"
if the tLanguage of tButton <> empty then
set the label of tButton to the tLanguage of tButton
end if
end repeat
******
On a related note,
Code: Select all
global gNativeLanguage; put the ("c" & gNativeLanguage) of fld "username"
returns a "bad factor" error. If gNativeLanguage is "English", and cEnglish of fld "username" is "Welcome", how can I properly define the custom property before using it?