Custom page loop
I have written a custom page that contains a DirRequest box that can be populated either by a directory browser or by manually typing a directory path.
The code for this page tests if the last directory in the path is a specific word. If it is, then allow the Install button to proceed. If it is not, then pop up a message box with instructions. After Okaying the button, stay on the page and let the user try again.
The way I do this is to have the function call itself. Recursion seems like the wrong approach but it works - almost. I have been unable to figure out a way to make the Back and Cancel buttons behave as expected.
Keeping track of the state of the DirRequest is not sufficient because these buttons should be able to do their actions regardless of its state. But I don't see how to work around this.
This seems like a fairly normal operation and I would have expected to find some info on it but I've come up empty. I'd appreciate any help.