The check_
is in the wrong spot.
Remember that myindexpropitem
is the method that just returns the object that responds to []
. The method check_mycheckbox
is what is defined for the indexed element that is returned by myindexpropitem[i]
.
The script code should be:
if myindexpropitem[i].mycheckbox_element.enabled? # i is from the for loop
myindexpropitem[i].check_mycheckbox
end