Subclass of Button component forces reference of Inspectable in superclass
Hi,
I have a subclass of the Button component and I created a function that overrides the addEventListener public function. This requires a variable for checking the type of event being added to add extra listeners. As this is a component I wish to have the Inspectable give the user the option to switch this off so I added a Boolean to do so.
However I get a type 1119 error (Symbol 'MainMenu', Layer 'buttons', Frame 1 1119: Access of possibly undefined property forceButtonEvents through a reference with static type Button.).
If I add the private/public variable to the Button class then the component properties work fine with no error. If I do not then it throws the error. If I hardcode the variable and do not use an inspectable then everything works fine.
My issue is that I do not wish to edit the superclass. I have other component extends that use inspectables just fine without references in the superclass but for some reason this Button class seems to throw this error.
Is there any way to define a variable in the superclass via the subclass (I presume not) or is there any reason why the Inspectable does not allow me to go without a reference in the superclass?
Any help is much appreciated.
Regards
Marc
