Thanks for testing, Bernd.
What I was trying to do was to set the rect of the controls of a background group; adjusting the placement in a resize handler that is called either directly or on preOpenCard. Basically, just laying out the controls. I'm beginning to wonder if I have some deeper issues, because I also cannot set any custom property of a group via the name of a group, only by its id. So for instance I can "Get the uType of group "backgroundControl" but "set the uType of grp "backgroundControl" to "barButton" " does not work either. (it's triggering a "can't find background" error) I have to set the uType of grp id 1725 instead. This is not restricted to just groups; sometimes just setting a custom property on anything is coughing up that same error; a restart seems to fix it.
So I'm not sure what is going on, actually.
This is my current code (that works):
Code: Select all
local tControlsOfMe
set the bottom of img "footer.png" of me to (the height of this stack )
set the top of img "chrome_template_bg.png" of me to the top of this card
set the top of img "header.png" of me to the top of this card
put the childControlIDs of me into tControlsOfMe
repeat for each line l in tControlsOfMe
if the uType of control id l is "barButton" then
set the top of control id l to (the top of img "footer.png" of me + 10)
end if
end repeat
My first try was a repeat with i=1 to the num of controls of me
and it worked great... except that the last control was never actually reached.