Page 3 of 3

Re: Exit to top?

Posted: Mon Aug 26, 2024 11:29 am
by stam
I see... However not sure this classes as a bug in "exit to top" as such

It seems (although I've not tested this extensively) that using "exit to top" in a modal only stops all handlers running in the modal - code in the calling is suspended and resumes when the modal is closed. I suspect this is by design and hence not a bug.


Regarding dialogData: My concern is that this is a global and context-less.
Setting the dialogData or setting the <customProp> of <stack> is effectively the same thing, except you can set multiple custom props rather than having to put all the values into a single global. And by binding the custom prop to a stack, you can provide context.

The code is identical - even as far as resetting the dialogData on completing actions - otherwise the algorithm won't work (it will stop at iteration 1 as is the case with your algorithm above).

Re: Exit to top?

Posted: Mon Aug 26, 2024 1:52 pm
by dunbarx
Stam.

Perhaps you are correct, in that a modal is considered special in some way, that is, a "stepping stone" along a busy path as opposed to just another stack that opens for this reason or that. In that sense, it is perhaps not considered a suitable place to be able to terminate a process?

Wouldn't the "exit to top" command therefore have to be explicitly ignored, or at least explicitly modified in its action in such a stack?

Craig

Re: Exit to top?

Posted: Mon Aug 26, 2024 1:57 pm
by stam
Hi Craig,

yes I think so - but can't really confirm.
I normally won't control program flow from a modal - I use the modal to achieve a task (such as add a record to a database) and then cede control back to it's mainstack, so I've not encountered this issue before, but suspect it's something like that...

Re: Exit to top?

Posted: Mon Aug 26, 2024 5:59 pm
by dunbarx
Stam.

Seems reasonable. Anyway, I have never once used a modal, apart from, say, the "ask" dialog, which hardly counts.

Craig