JohnBasedow
12 years agoVisitor
Dev Issue - Multiple roMessageDialog with back button
I'm trying to implement a quick way for the user to change search filter settings, and to accomplish this, I am using an roSearchScreen, and two roMessageDialog windows.
If the user presses the info button (*) on the roSearchScreen, I open the first roMessageDialog, and call EnableBackButton(false) before it is shown. I add two buttons to the first roMessageDialog, one to configure one option, and the other for another option. This window also has EnableBackButton(false) set.
If I open the first roMessageDialog and hit the 'Back' button, nothing happens, like I expect. If instead, I choose the option value I want, then return to the first roMessageDialog and hit 'Back', the channel returns to my Channel's home screen, instead of the Search screen, which is unexpected, since I thought I had disabled the Back button.
At this point, my code is still in the first roMessageDialog's event loop waiting for any kind of message, of course none come, so it is essentially locked. To work around this, I added a timeout to the wait call in the first dialog, and that un-locks my channel's home screen. Of course this is a dirty workaround, and I can't leave it that way.
Flow:
Issue:
Okay case (as long as I don't hit the back button after the 2nd roMessageDialog closes, it works fine):
It looks like either I'm doing something incorrectly, or that the platform places roMessageDialogs in a special position atop the screen stack.
Any help would be appreciated!
Edit: Formatted the flows a little better
If the user presses the info button (*) on the roSearchScreen, I open the first roMessageDialog, and call EnableBackButton(false) before it is shown. I add two buttons to the first roMessageDialog, one to configure one option, and the other for another option. This window also has EnableBackButton(false) set.
If I open the first roMessageDialog and hit the 'Back' button, nothing happens, like I expect. If instead, I choose the option value I want, then return to the first roMessageDialog and hit 'Back', the channel returns to my Channel's home screen, instead of the Search screen, which is unexpected, since I thought I had disabled the Back button.
At this point, my code is still in the first roMessageDialog's event loop waiting for any kind of message, of course none come, so it is essentially locked. To work around this, I added a timeout to the wait call in the first dialog, and that un-locks my channel's home screen. Of course this is a dirty workaround, and I can't leave it that way.
Flow:
Issue:
Home
-- Search (roSearchScreen)
-- Options (roMessageDialog)
-- Hit 'Back' button here = does nothing
-- Option 1 (roMessageDialog)
-- Option 1 dialog closes
-- Options
-- Hit 'Back' button here
Home
Okay case (as long as I don't hit the back button after the 2nd roMessageDialog closes, it works fine):
Home
-- Search (roSearchScreen)
-- Options (roMessageDialog)
-- Option 1 (roMessageDialog)
-- Option 1 dialog closes
-- Option 2 (roMessageDialog)
-- Option 2 dialog closes
-- Hit 'Done'
-- Options dialog closes
-- Search
Home
It looks like either I'm doing something incorrectly, or that the platform places roMessageDialogs in a special position atop the screen stack.
Any help would be appreciated!
Edit: Formatted the flows a little better