I’d like to be able to show an error message (or maybe even a success message!) to the user. However, this would be for an asynchronous event – so it is presumably possible for the user to have jumped to another page in-between the sending for the event and the response.
Given that that is the case, and given that i use a tabgroup as the “base” in the initial app.xml, how am i meant to access the current window? Ti.UI.getCurrentWindow() doesn’t do anything on my system – no error, no nothing.
I’m using the Titanium 3 api.
Since your using a tab group you can use
Titanium.UI.currentTab. Then you can get the window of the tab like this:Specific doc reference (just in case).
Also, you can always use a
Titanium.UI.AlertDialog, that will show up no matter what window your on, if it meets your requirements.