Exit to top?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

stam
Posts: 3060
Joined: Sun Jun 04, 2006 9:39 pm

Re: Exit to top?

Post by stam » Mon Aug 26, 2024 11:29 am

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).

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Exit to top?

Post by dunbarx » Mon Aug 26, 2024 1:52 pm

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

stam
Posts: 3060
Joined: Sun Jun 04, 2006 9:39 pm

Re: Exit to top?

Post by stam » Mon Aug 26, 2024 1:57 pm

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...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Exit to top?

Post by dunbarx » Mon Aug 26, 2024 5:59 pm

Stam.

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

Craig

Post Reply