Skip site navigation (1) Skip section navigation (2)

Re: Refresh objects on Click

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Vinicius Santos <vinicius(dot)santos(dot)lista(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Refresh objects on Click
Date: 2011-08-10 10:34:17
Message-ID: CA+OCxoxEdqBAgFN3o99uZySZ8F5FY50QU_EUxbC6qxHcBZwTRA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi,

On Wed, Aug 10, 2011 at 4:30 AM, Vinicius Santos
<vinicius(dot)santos(dot)lista(at)gmail(dot)com> wrote:
> Hi Dave,
>
> I'm sending the patch on the Refresh object on Click[1].
>
> I put the three options. "None", "Refresh object on click" and "Refresh
> object and children on click"
>
> You can review it?

Still seems to need some work unfortunately:

- Don't use the translated strings to test settings (eg. 'if
(settingRefreshOnClick == _("Refresh object on click"))' ). Use an
enum instead, to ensure it continues to work if the user switches
language.

- The new option should be on the Browser tab of the Options dialogue,
not the Query Tool tab.

- When using "Refresh object on click", clicking on a table adds
multiple copies of the child nodes - see the attached screenshot. It
also seemed to break the reverse engineered SQL.

- Clicking the first "Columns" collection under the "test" table led to a crash:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   pgAdmin3-Debug                	0x00911e51
pgaFactory::GetMetaType() + 15 (factory.cpp:187)
1   pgAdmin3-Debug                	0x00754f71 pgObject::GetMetaType()
const + 37 (pgObject.cpp:82)
2   pgAdmin3-Debug                	0x007be0f0
pgTableObjCollection::CanCreate() + 36 (pgTable.cpp:1676)
3   pgAdmin3-Debug                	0x00746a1c pgObject::GetNewMenu() +
70 (pgObject.cpp:200)
4   pgAdmin3-Debug                	0x003f3020
frmMain::setDisplay(pgObject*, ctlListView*, ctlSQLBox*) + 846
(events.cpp:524)
5   pgAdmin3-Debug                	0x003f4391
frmMain::execSelChange(wxTreeItemId, bool) + 2313 (events.cpp:455)
6   pgAdmin3-Debug                	0x003ef7af
frmMain::OnTreeSelChanged(wxTreeEvent&) + 131 (events.cpp:368)
7   libwx_base_carbonud-2.8.0.dylib	0x0210f91d
wxAppConsole::HandleEvent(wxEvtHandler*, void
(wxEvtHandler::*)(wxEvent&), wxEvent&) const + 65
8   libwx_base_carbonud-2.8.0.dylib	0x021afedc
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 212
9   libwx_base_carbonud-2.8.0.dylib	0x021b1888
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 204
10  libwx_base_carbonud-2.8.0.dylib	0x021b19e3
wxEvtHandler::ProcessEvent(wxEvent&) + 311
11  libwx_base_carbonud-2.8.0.dylib	0x021b1a24
wxEvtHandler::ProcessEvent(wxEvent&) + 376
12  libwx_macud_core-2.8.0.dylib  	0x01ae5dd2
wxWindowBase::TryParent(wxEvent&) + 162
13  libwx_base_carbonud-2.8.0.dylib	0x021b1a4a
wxEvtHandler::ProcessEvent(wxEvent&) + 414
14  libwx_base_carbonud-2.8.0.dylib	0x021b1a24
wxEvtHandler::ProcessEvent(wxEvent&) + 376
15  libwx_macud_core-2.8.0.dylib  	0x01b17a5a
wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) + 52
16  libwx_macud_core-2.8.0.dylib  	0x01b256e7
wxGenericTreeCtrl::DoSelectItem(wxTreeItemId const&, bool, bool) +
1099
17  libwx_macud_core-2.8.0.dylib  	0x01b2675b
wxGenericTreeCtrl::OnMouse(wxMouseEvent&) + 4139
18  libwx_base_carbonud-2.8.0.dylib	0x0210f91d
wxAppConsole::HandleEvent(wxEvtHandler*, void
(wxEvtHandler::*)(wxEvent&), wxEvent&) const + 65
19  libwx_base_carbonud-2.8.0.dylib	0x021afedc
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 212
20  libwx_base_carbonud-2.8.0.dylib	0x021b1888
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 204
21  libwx_base_carbonud-2.8.0.dylib	0x021b19e3
wxEvtHandler::ProcessEvent(wxEvent&) + 311
22  libwx_base_carbonud-2.8.0.dylib	0x021b1a24
wxEvtHandler::ProcessEvent(wxEvent&) + 376
23  libwx_macud_core-2.8.0.dylib  	0x01b17a5a
wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) + 52
24  libwx_macud_core-2.8.0.dylib  	0x01a13394
wxMacTopLevelMouseEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 1461
25  libwx_macud_core-2.8.0.dylib  	0x01a13ee4
wxMacTopLevelEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
void*) + 198
26  com.apple.HIToolbox           	0x92772e54
_InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) +
36
27  com.apple.HIToolbox           	0x925ee82b
_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
+ 1602
28  com.apple.HIToolbox           	0x925edca8
_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
+ 482
29  com.apple.HIToolbox           	0x92602ac9 SendEventToEventTarget + 76
30  com.apple.HIToolbox           	0x92603249
_ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
+ 1915
31  com.apple.HIToolbox           	0x925eece6
_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec
+ 2813
32  com.apple.HIToolbox           	0x925edca8
_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec
+ 482
33  com.apple.HIToolbox           	0x92602ac9 SendEventToEventTarget + 76
34  libwx_macud_core-2.8.0.dylib  	0x01996a6d
wxApp::MacHandleOneEvent(void*) + 41
35  libwx_macud_core-2.8.0.dylib  	0x01996b84 wxApp::MacDoOneEvent() + 214
36  libwx_macud_core-2.8.0.dylib  	0x019b8734 wxEventLoop::Dispatch() + 42
37  libwx_macud_core-2.8.0.dylib  	0x01a7dd84 wxEventLoopManual::Run() + 294
38  libwx_macud_core-2.8.0.dylib  	0x01a4f789 wxAppBase::MainLoop() + 85
39  libwx_macud_core-2.8.0.dylib  	0x01a4ef75 wxAppBase::OnRun() + 47
40  libwx_base_carbonud-2.8.0.dylib	0x02153072 wxEntry(int&, wchar_t**) + 168
41  libwx_base_carbonud-2.8.0.dylib	0x0215327b wxEntry(int&, char**) + 63
42  pgAdmin3-Debug                	0x000bdec4 main + 36 (pgAdmin3.cpp:118)
43  pgAdmin3-Debug                	0x0009bda5 start + 53

- In "Refresh object and children on click" mode, if I click on a
table, and then on a database, it seems to refresh the database, but
then displays the properties of the table, not the database.

Please see about fixing those issues, and then I can give it a more in
depth review.

Thanks!

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2011-08-10 22:06:30
Subject: Re: Fixing issues between objects and properties dialogs
Previous:From: Dave PageDate: 2011-08-10 09:48:27
Subject: Re: pgAgent crashes on failed connection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group