Answer dialog enhancement...
bobsneidar at iotecdigital.com
Tue Mar 31 19:12:36 EDT 2020
Seems like most if not all this code has been done already in the dialog itself. I’ll look into it because I wanted at one point to make an enhanced answer dialog as well.
On Mar 31, 2020, at 4:09 PM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
On 3/31/2020 6:10 PM, Bob Sneidar via use-livecode wrote:
The answer dialog is simply a stack in and of itself if I am not mistaken. I’m wondering if you couldn’t find that stack and clone it for your own purposes…
Yes. That is easy enough. Turn on "Show IDE Stacks in List" from the "View" menu and there are the Answer and Ask Dialogs.
Then you need to work out how the Answer command passes its data via "the dialogData" property into order to create an alternative calling routine that sets up the Don't Ask Again check box
You could copy the Answer to your own project and in the Standalone Settings switch to Manual Inclusions and exclude the Answer Dialog. Then I believe the answer command will use the copy of the dialog in your project. Then you need to add the button, change the resizeStack handlers accordingly, script its show and hide, add code to get the return value
AND remember to see if the dialog needs updates with each new release of LiveCode.
That is why I asked if anyone has already done it so as to not re-invent the wheel.
More information about the use-livecode