Home » Community » Newbie corner » CanClose? Mechanism to prompt user to save edits
Re: CanClose? Mechanism to prompt user to save edits [message #34804 is a reply to message #34801] |
Tue, 13 December 2011 04:29   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
Above solution still has a flaw.
If the Ctrl (the outmost container) in a page is modified and the containing page is crossed(to initiate a close request), the user will be prompted whether he/she wants to save, discard edit or cancel the close action when overrided Accept() is called from within CancelClose gate. If user selects "no" to discard change (close without saving) and no action was taken to unset the modified flag, the Accept() gets called again before the Ctrl is destructed. A simple fix would be to always reset modified flag when the user chooses to discard edit. This way when Accept() is called at the moment of destruction, it always returns true so that it is silently disposed of as wished.
[Updated on: Tue, 13 December 2011 04:33] Report message to a moderator
|
|
|
 |
|
CanClose? Mechanism to prompt user to save edits
By: Lance on Sun, 10 April 2011 04:57
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Sun, 10 April 2011 05:26
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Sun, 11 December 2011 18:28
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Sun, 11 December 2011 18:37
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Wolfgang on Sun, 11 December 2011 18:48
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Sun, 11 December 2011 23:57
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Mon, 12 December 2011 16:52
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Tue, 13 December 2011 01:15
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Tue, 13 December 2011 04:29
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: mdelfede on Fri, 16 December 2011 21:09
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Sat, 17 December 2011 04:31
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: mdelfede on Sat, 17 December 2011 10:54
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Lance on Sun, 18 December 2011 16:28
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: mdelfede on Sun, 18 December 2011 16:35
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Wolfgang on Mon, 12 December 2011 00:14
|
 |
|
Re: CanClose? Mechanism to prompt user to save edits
By: Wolfgang on Mon, 12 December 2011 09:38
|
Goto Forum:
Current Time: Fri Jul 18 11:04:39 CEST 2025
Total time taken to generate the page: 0.03749 seconds
|