On Thu, Feb 7, 2013 at 10:57 AM, Michal Kozusznik <kozusznik.mic...@ifortuna.cz> wrote: > OK. Thanx for deeper explanation. Looks like I missed a point twice :) > > >> If you have a simple way to make it work, I'd love >> to see a proposed patch because at the moment, I don't see a way to do >> it that wouldn't take at least a few days of work. > > > > Don't know architecture of pgadmin, but if requesters inherit from some base > class, it should be enough to modify only this one. Store old values into > some array (or maybe consider some hash) and compare it to current while > hitting ESC/Cancel. I would do that this way if I was author of code. > Basically small change.
That's basically what the patch I posted does. The problem is that the base class doesn't have any knowledge of what controls are on an instantiated dialogue, or how to test if they've been changed from whatever the default is (for new objects) or from whatever pgObject derived object exists for edits. The only way I can see to do this is to write a function for each individual dialogue that can compare the values of each control to the defaults or an existing object - pretty similar to what CheckChange() already does - the difference being that it is validating as well. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support