Closed Adolio closed 5 years ago
I've committed a change that should avoid this null object reference error.
However, I'm curious why you are dispatching Event.TRIGGERED manually on Keyboard.SPACE when the button has focus. You seem to be duplicating behavior that already exists in the Button class...
Thanks Josh for the fix!
So basically what I'm trying to achieve is a Generic UI Navigation System which allows player/user to control & navigate the full UI with various input systems such as game-pad, keyboard or mouse.
My issue was that the user can configure the keyboard controls and map the SPACE action to the validation action. Then when the navigation system notices a SPACE key down, it fakes a button trigger and Feathers does it as well which causes the above issue.
In a nutshell the UI Navigation System allows to:
This feature is currently in standby because it requires to dig a bit too much in Feathers to solve tricky cases but if you are interested to have a look I can share what I have so far, feel free to ask. Otherwise I will perhaps come back to you later on if I'm facing something I cannot solve by myself.
Hello Josh,
I have a tricky case where get a
null object reference
when I remove the focus of the triggered button directly in its trigger handler. Plus, the triggering of the button is happening by hand when SPACE key is pressed.In a nutshell:
1) Call of
FocusManager.focus = null;
in a button event handler.2) Call of the button trigger directly in Starling stage
KeyboardEvent.KEY_DOWN
event.Here is the stack trace:
Thanks in advance for your help.