Dear, Fuse team.
I want to use back press button to exit the app. So I used tag and called a function like this.
[code in MainView.ux]
[function]
function backButtonClicked(obj, KeyEventArgs){
debug_log("***************************** menu button clicked");
currentPage.value = mainPage;
}
However, when I press the back button, some error occur like below…
LOG: ***************************** menu button clicked
ERROR: Object reference was null
Uno.NullReferenceException occured.
at Fuse.Navigation.Router.GoUp()
at Fuse.Navigation.Router.GoBack()
at Fuse.Navigation.Router.OnKeyPressed(object,Fuse.Input.KeyEventArgs)
at Fuse.Input.KeyPressed.Invoke(Fuse.Input.KeyPressedHandler,object,Fuse.Input.KeyPressedArgs)
at Fuse.VisualEvent2.InvokeInternal(THandler,object,TArgs) at Fuse.VisualEvent
2.InvokeGlobalHandlers(Fuse.Visual,TArgs)
at Fuse.VisualEvent2.Raise(TArgs,Fuse.VisualEventMode,bool,[Uno.Action<TArgs, Uno.Collections.IList<Fuse.Visual>>]) at Fuse.VisualEvent
2.RaiseWithBubble(TArgs,[Fuse.VisualEventMode])
at Fuse.Input.Keyboard.RaiseKeyPressed(Uno.Platform.Key,bool,bool,bool,bool)
at Fuse.KeyboardBootstrapper.OnKeyPressed(object,Uno.Platform.KeyEventArgs)
at Uno.Platform2.Application.OnKeyDown(Uno.Platform.Key,Uno.Platform.EventModifiers)
How can I use the tag to exit the app?
Moreover, Is there any back button press example?
Thanks,
Judy.