Event type 'com.flexcapacitor.events:StateHandler' is unavailable.

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:
[Event(name=”callFunction”, type=”com.flexcapacitor.events.StateHandler”)]

The problem is the class is defined as StateHandlerEvent not StateHandler. So I change it StateHandlerEvent and it works:
[Event(name=”callFunction”, type=”com.flexcapacitor.events.StateHandlerEvent”)]

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.


One thought on “Event type 'com.flexcapacitor.events:StateHandler' is unavailable.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s