Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

string evaluated as object name

Bryan Teoh Sep 27, 2018 06:50PM CEST

I'm trying to create an array of object names which can then be evaluated in a loop. For example, assuming I have buttons "thing1" "thing2" and "thing3" and would like to turn them all off.

decl objArray = {thing1, thing2, thing3};
decl i;

for(i = 0;i < sizeof(objArray); i++){
objArray[i].x=0;
}

I've successfully created an array with both the direct objects as well as a string with the object name, but haven't figured out how get it back out of the array and manipulate it. Any ideas?

Up 0 rated Down
MiluX Oct 08, 2018 05:10PM CEST
Maybe with findobject() ?

decl obj;

for(i = 0;i < sizeof(objArray); i++){
obj = findobject(objArray[i]);
obj.x=0;
}

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
support@liine.net
http://assets2.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete