Re: hacking on Beta 1.6 - scratch pad is dangerous :)

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: hacking on Beta 1.6 - scratch pad is dangerous :)
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E40154CCD6@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на hacking on Beta 1.6 - scratch pad is dangerous :)  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
Список pgadmin-support
 


From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
Sent: 15 September 2006 09:49
To: Dave Page
Cc: pgadmin-support@postgresql.org
Subject: hacking on Beta 1.6 - scratch pad is dangerous :)

I am sooo impressed with this new release! And that scratch pad is a really helpfull addition, I fell in love with it.

BUT... that is a dangerous love, I learned.

What happened?

I constructed a fine query:

select md5(array_to_string(array( select md5(id_pkl||id_label || id_lg || name_l||letztespeicherung) from otlabel where quarant=0 ),''))

ran it, got a checksum for a WHOLE table (I was sooo proud of myself :) ... 
 
:-)
 
and copied it to the scratch pad.

Then, I wanted to test if this checksum really changes when changes are made to the table ... , so I changed the query:

select md5(array_to_string(array( select md5(id_pkl||id_label || id_lg || name_l||letztespeicherung||'pgadmin is great') from otlabel where quarant=0 ),''))

and pressed F5. Quickly, the interface blinked, and --- the result stayed the same! Wuha?

I changed the query more and more, nearly panicked ...

and then learned: hey, I was pressing F5 with focus on the scratch pad. NOTHING was done to my query result :( Of course not --- it's just a scratch pad.

So I propose a small change: as you allready capture F5 and F7 within the scratch pad, at least give a dialog saying something along "ha-ha! nothing happens in the scratch pad" 
 
What platform? I just tried this on Windows and it works perfectly. The code is also written such that F5 should always execute the query... oh hang on - I don't suppose you had un-docked the scratch pad? If so, it becomes a seperate window controlled by the layout manager. There's no way for me to catch keypresses in that unless I do some *really* funky stuff writing custom versions of each undockable contro for each window. I'm not sure I'd want to though, as F5 in one window really shouldn't affect another anyway, even if it is undocked (imho). That would potentially violate the principle of least surprise.
 
Regards, Dave.

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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Crash while trying to open some help page
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: hacking on Beta 1.6 - scratch pad is dangerous :)