Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Lance is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TheIDE refactoring and multiple packages build support?
Next Topic: mySql - how to use - what is needed?
Goto Forum:
  


Current Time: Fri Jul 18 11:04:39 CEST 2025

Total time taken to generate the page: 0.03749 seconds