Event type ‘com.flexcapacitor.events:StateHandler’ is unavailable.
Here is the line causing the error:
If I remove the callFunction attribute the error goes away. So what’s the issue?
In my StateHandler class I have this metadata:
The problem is the class is defined as StateHandlerEvent not StateHandler. So I change it StateHandlerEvent and it works:
From the documentation
If you do not identify an event with the [Event] metadata tag, the compiler generates an error if you try to use the event name in MXML. The metadata for events is inherited from the superclass, however, so you do not need to tag events that are already defined with the [Event] metadata tag in the superclass.