Custom method on container does not set custom component property

I would like to set several custom properties when a Window opens or is navigated back to.
Currently I have a script on the Window's internalFrameActivated that makes a call to a custom function on a Container.

def setValues(self):
	def handleContainer(container):
		for comp in container.getComponents():
			if comp.__class__.__name__ == 'PMILabel':
				processLabels(comp)
			
	def processLabels(label):
		try:
			setattr(label, 'myVal', 'Bonjour')
			print 'processLabels call'
		except AttributeError:
			print lalel.setPropertyValue('myVal', 'Bonjour')
		
		
	handleContainer(self)

I have four labels, each with a custom property of myVal. The custom function executes, and prints processLabels, but the label's texts remain unchanged.

The previous script used this instead of setattr: label.myVal = 'Bojnour'

What am I missing?

Turns out, it helps to bind the text property to the correct custom property!
:man_facepalming:

EDIT: Ok, that worked on the test dummy, but it's not working at all in the actual project.

Same basic setup, except that I get an error stating that the custom function does not exist, specifically object has no attribute setRepeaterMinEnable

This is the call from internalFrameActivated:

system.gui.getParentWindow(event).getComponentForPath('Root Container.Container Recipe Load').setRepeaterMinEnable()

This is the function to be called:

def setRepeaterMinEnable(self):

	def processContainer(container):
		for comp in container.getComponents():

# --- If it's a Template Repeater ---
			if comp.__class__.__name__ == "TemplateRepeater":
				processTemplateRepeater(comp)
			elif hasattr(comp, 'getComponents'):
				processTemplateRepeater(comp)
				
				
	def processTemplateRepeater(repeater):
		templates = repeater.getLoadedTemplates()
		try:
			repeater.minEnable = 0
			print 'minEnable write success?'
		except:
			print 'minEnable write error'
		
processContainer(self)

And anther error stating that NameError: name 'processContainer' is not defined.

EDIT 2:
Indent problem! :man_facepalming:

Long-standing gap in the application of Ignition's PyComponentWrapper everywhere it might be needed. When jython applies default wrapping to a VisionComponent, it doesn't end up with the attributes for custom properties and custom methods. Details here:

TL/DR: Install my Integration Toolkit to get fully automatic wrapping. If you cannot do that, use the PyComponentWrapper manually.