How do I use a custom stack as an "ask"-dialog?
Posted: Tue Oct 07, 2008 7:03 am
Hi there everyone! I'm horribly new at using Revolution and I need help with a small problem:
In my current application I use a simple ask dialog on a couple of my substacks when I need the user to specify one of several options (what options vary each time). I simply list the options in the prompt and the user writes what options to use in a text field (this sounds like a horrible solution but the answer does not _have_ to be exact and they can come up with their own options if they want to). I want to replace this with a stack with a scrolling list field with the known options and a text field where they can write their own.
Ideally I want it to work like this:
The application notices that the user has to specify an option and calls the "option"-stack with the known options (which I get from a data stack) as a comma-separated string. The stack opens and populates the list field with the known options. The user then chooses one of the known options or writes his own in the text field. After clicking "OK" the stack returns the contents of the text field (if used) or the selection of the list field to the handler from which it was called. The handler will then use this answer.
What is the easiest way to make a stack do something like the above? Alternative solutions to the above scenario is also definitely welcome
Thanks!
Edit: I have already created the "options stack" and have written the code to populate the list field. What I don't get is how to call it from the middle of one of several different handlers and then use the result, like you can do with the ask dialog.
In my current application I use a simple ask dialog on a couple of my substacks when I need the user to specify one of several options (what options vary each time). I simply list the options in the prompt and the user writes what options to use in a text field (this sounds like a horrible solution but the answer does not _have_ to be exact and they can come up with their own options if they want to). I want to replace this with a stack with a scrolling list field with the known options and a text field where they can write their own.
Ideally I want it to work like this:
The application notices that the user has to specify an option and calls the "option"-stack with the known options (which I get from a data stack) as a comma-separated string. The stack opens and populates the list field with the known options. The user then chooses one of the known options or writes his own in the text field. After clicking "OK" the stack returns the contents of the text field (if used) or the selection of the list field to the handler from which it was called. The handler will then use this answer.
What is the easiest way to make a stack do something like the above? Alternative solutions to the above scenario is also definitely welcome

Thanks!
Edit: I have already created the "options stack" and have written the code to populate the list field. What I don't get is how to call it from the middle of one of several different handlers and then use the result, like you can do with the ask dialog.