The "Wait For" addition to the language has saved a lot of time - no longer do I have to create multiple subs for async operations and with dialogs and some other items.
But, one thing that I often find I need to do is to display an activity and pause program flow until that activity closes.
Right now I have to either create a class for each activity that I want to use this way, or I have to keep track of where I display the activity from so I'll know where to return program flow back to.
But, what would save a lot of time is if Wait For supported Activities, maybe like this:
This would simply display the Help activity and program execution would pause until the Help activity closes (by the user or code). Thats it - Simple!
This would allow for very complex dialogs made from activities. And no parameters would need to be in the Wait For statement because any values selected/entered by the user of the dialog can be easily handled using as many global vars as needed.
Adding support for Activities to Wait For would make my code so much easier to read, write and debug!
But, one thing that I often find I need to do is to display an activity and pause program flow until that activity closes.
Right now I have to either create a class for each activity that I want to use this way, or I have to keep track of where I display the activity from so I'll know where to return program flow back to.
But, what would save a lot of time is if Wait For supported Activities, maybe like this:
B4X:
Wait For "Help"
This would simply display the Help activity and program execution would pause until the Help activity closes (by the user or code). Thats it - Simple!
This would allow for very complex dialogs made from activities. And no parameters would need to be in the Wait For statement because any values selected/entered by the user of the dialog can be easily handled using as many global vars as needed.
Adding support for Activities to Wait For would make my code so much easier to read, write and debug!
Last edited: