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   |
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.
|
|
|
 |
|
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 21:26:43 CEST 2025
Total time taken to generate the page: 0.03999 seconds
|