Hi,
I'm having an exception and a screen behaviour I can't really handle in this specific scenario.
I'm on a screen with a list, the list is synced on login. New items can be created Online and Offline.
If items are created offline, they are synced as soon as you get online, and that's working great.Item detail is only available IF you are online or were created while offline and sync hasn't happened for those items yet.
Now for the real pain:
I'm Online and everything is synced. Mobile data is disabled. Wireless is enabled and with and active Internet connection.
Now quickly disable the wireless connection and click "New".
It navigates to the screen but throws a communication exception. I'm using the Getnetworkstatus() function in some parts of my code and it works well, but in this case it seem to not being fast enough detecting that change. I have (against my good practices will) removed the exception message but, since I'm loading a big binary (up to 2mb) I'm also using this component Progress Spinner to show an overlaying loading animation. It as a local var to control if the screen is loading or not. Once the exception is catched, context is loss and I can't return that var to the state where the loader shouldn't show.
I've tryed everything I can remember, even changing to the list screen, but it get's stuck on redirections.
I'm thinking about using another loader animation but that will just take me more time and testing since I'm not a JS expert. Also, even if I get another loader that doesn't locks my screen until I click back and repeat the operation, I still have that exception without a message...
I have also tryed using the webblock NetworkStatusChanged, but couldn't really understand it fully and there are no complete examples for it that apply to my case.
What can you suggest?
RegardsBruno
Hi Gilfoyle,
I had a bit of a problem with connection error messages polluting user experience when it wasn't really necessary. I found using the NetworkStatusChange block pretty helpful in cleaning it up.
usage (for me but yours may differ): I dropped it onto each screen (but you could probably do it in the layout web block to cover more cases with less code.
and my NetworkStatusChanged screen action (haha, just noticed I didn't cleanup the auto generated name. ignore that, its not important, just sloppy of me)
Thanks Steve. That's helpful! Will look at it soon.