Objective is to update selected index on another standard template based on selected 2 state toggle in template repeater.
I need to call a custom method on a template repeater from a 2-state toggle used on the template inside the repeater.
Template repeater method:
def checkReason(self):
templates = event.source.getLoadedTemplates()
for template in templates:
if template.getComponent('poiStatus').IsSelected == 1:
poi_desc = str(template.poi_desc)
passList = ["BURN MARK","FLASH","GLASS FIBERS","GATE VESTIGE","SHORT SHOT"]
if poi_desc in passList:
#SET TO DAMAGED REASON INDEX
event.source.parent.getComponent('Reason').selReason = 4
template repeater>template>2-state toggle action performed event handler call to checkReason():
event.source.parent.parent.checkReason()
I have tried with up to 4 parents nested in this call. Still getting error that object has to attribute checkReason. Maybe I’m not understanding the parent part.