Re: ESC closes window without warning

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: ESC closes window without warning
Дата
Msg-id CA+OCxowsT1U2hM748Vf6K8x58drETh9zLpiZP8vFBgGTGvg2-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ESC closes window without warning  (Michal Kozusznik <kozusznik.michal@ifortuna.cz>)
Ответы Re: ESC closes window without warning  (Michal Kozusznik <kozusznik.michal@ifortuna.cz>)
Список pgadmin-support
On Thu, Feb 7, 2013 at 10:57 AM, Michal Kozusznik
<kozusznik.michal@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



В списке pgadmin-support по дате отправления:

Предыдущее
От: Michal Kozusznik
Дата:
Сообщение: Re: ESC closes window without warning
Следующее
От: Dave Page
Дата:
Сообщение: Re: cannot get Debugger to install on 9.2 on Win7 x-64