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 #34784 is a reply to message #34768] Mon, 12 December 2011 13:14 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Lance.

Lance wrote on Sun, 10 April 2011 04:57


I did some test in U++. I open some files (some are the essential libary files), and make some changes and click the little square on the tab. It silently decides to save the possibly unintentional changes and closes the current tab. I am afraid this is too bold; the traditional Windows' way, user consent before action, is more reasonable IMHO..


Lance wrote on Sun, 10 April 2011 05:26


WhenClose is a TopWindow callback, so I know how to guard it when the main window is to be closed. Now, like TheIDE, many files(slave ctrls) are in TabCtrl pages, what events should I hook to when a tab page is to be closed?


In my opinion, TheIDE behaviour with TabBar is normal if you use some kind of source code management system (svn, git, etc.) to be able revert changes when needed.

Lance wrote on Sun, 11 December 2011 18:28


In my case, I use TabCtrl to host different pages that are derivated from ParentCtrl


Lance wrote on Sun, 11 December 2011 23:57


For example, I may be editing something in one tab page and occasionally switch to another tab page to consult some other information. Say I am doing an order, in the process I may become interested in a particular inventory item, e.g. its flow and current count, etc, I will double click the item to bring out a new tab page displaying the inventory activities information. It may not hurt that much to save partial edits but it's preferable not to commit until I (the end user) ask to, e.g. I may subsequently decide to cancel changes made in this session, it will be necessary to remember the edit/undo history if partial changes and saved in the editing process.



In the attachment you could find another example how to save/cancel, revert to default changes of TabCtrl, while using Serialize and storage data structure(s).

Also, take a look for CtrlRetriever example.
 
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 21:26:43 CEST 2025

Total time taken to generate the page: 0.03999 seconds