I was giving a popup to the user to confirm something using create_popup_to_confirm of the window manager.
Now, problem is I coded it in one method of the view.
I want to call this popup method now at different user interaction stages of the view - for eg loss of data, confirm save, confirm send mail etc. So I'd call this popup with different question text preferably.
Problem is that what I understand is that I have to subscribe to YES/NO event, and I can handle them at the YES/NO event handler only.
But I want to do different things based on from where the action was triggered.
For eg. If user pressed cancel without saving, after the popup i want to navigate to the start menu. If user pressed save and a mail is being sent, after the mail confirmation popup, i want to go to a different view.
This is just an example. Basically I want to know how to get the return value of what user has pressed in the popup.
If I write anything after the popup, that code is executed first before the popup is called.
Please note I know that we have to write the handler code in the event handler method.I wanted the return value "yes/no" after my popup has been showed at some point in the program.
Thanks in adv.