I have an event (button pressed) on my main screen that opens another screen using ShowModal.
When the user interacts with the new screen, it sets a couple of App shared properties.
However, the event code doesn’t actually wait until this new screen is closed before resuming. Is this intended, and if so, what is the point of ShowModal?
Jeremie_L
(Jeremie_L)
November 16, 2024, 8:40pm
2
That is how it works on Mobile.
If you have some code that should execute after the modal screen is closed, you will need to find a way to “call back” to the parent screen.
The point of ShowModal is to show a modal screen that slides up and can be closed with a swipe down.
1 Like
Jeremie_L
(Jeremie_L)
November 16, 2024, 8:42pm
3
Here’s a post I wrote about the “call back” some time ago.
Very quick reply as I don’t have much time to get into the details of this.
Basic way
Have a set of properties in a Module. In the MobileScreen.Activate event check if these properties hold new values you should use to update the UI.
Delegate / callback
Set a Delegate method the child view should callback to, using the delegate.invoke method.
The child view will call that to update the UI with whatever values you need.
Notification observer
Using Jason King’s iOSKit, use the notific…
Thanks
Is there an obvious event I can use on the calling screen when the modal screen is closed?