I've been running into an odd problem lately when it comes to compiling my application. In some cases I get the following error:
Error: Access of possibly undefined property customerNameValidator through a reference with static type com.xxx.customer.CustomerValidators
Here is the Validation Subscriber that is defined in my MXML view:
And here is the actual validator MXML:
public var model:CustomerDetail
Based on the error it appears as though the compiler is not seeing the StringValidator with id customerNameValidator as a public property of the validator group. The odd part is that this code does compile fine in certain cases. I can compile through Flex Builder and ANT fine on my MacOS development machine but when the same ANT script gets executed by my Windows Hudson CI server the error occurs. Turning off strict type checking also fixes the problem.
I don't think this is a Cairngorm issue but thought I'd post here to see if anyone else had come across it while using the Cairngorm validators.
Yes, I've heard of a case as well. Did you manage to isolate it so we can send it to engineering?
Based on a suggestion I found on this site (http://curtismorley.com/flash-9-flex-error-messages/) I was able to fix my compile error.
What I ended up doing was casting the validator group to the type I wanted it to be in order to keep the compiler happy. So my fixed validator subscriber looks like this: