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

Re: Fixing issues between objects and properties dialogs

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: "pgadmin-hackers(at)postgresql(dot)org" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Fixing issues between objects and properties dialogs
Date: 2011-07-24 11:58:07
Message-ID: CA+OCxoy7iA2+cw9tc=93R7BSr7WCnYz3H=zLxvtFJd5=hv_uTg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
The former fix seems more appropriate. Operations in frmMain shouldn't
cause dialogues to close.

Simple fix seems to be to store a pointer to the dialog in pgObject;
if not null, disallow drop, or if trying to view properties, use the
pointer to raise the existing dialogue. Clear the pointer when the
dialog is closed.

On Sunday, July 24, 2011, Guillaume Lelarge <guillaume(at)lelarge(dot)info> wrote:
> Hi,
>
> There is at least one bug that I know since I started to use pgAdmin,
> and I've seen no work on it.
>
> When someone connects to a database, the treeview is built from
> informations gathered in the database. Not only do we fill the treeview,
> but we also create a lot of pgObject objects (pgTable, pgSequence, you
> name it). These objects are used when someone clicks on a treeview node
> to display informations in the properties tab of the browser, and in the
> SQL pane. They are also used when the user opens an object properties'
> dialog. The object is used all the time by the properties' dialog while
> it's only usable till the object's node is refreshed in the treeview.
>
> Try this:
>
> * open an object properties' dialog
> * refresh the object's node in the treeview
> * change something in the properties' dialog
> * click OK
>
> Or try this
>
> * open an object properties' dialog
> * drop the object in the treeview
> * change something in the properties' dialog
> * click OK
>
> Sure crash in both case, whatever the object you're working with.
>
> Question is: how can we fix that?
>
> I see two potential fixes:
>
>  * prevent refresh/drop while a properties dialog is open
>
>  * close a properties dialog if the object associated is about to be
>    refreshed/dropped
>
> Not sure which one is better. I prefer the latter, but it'll be more
> difficult to code.
>
> Also, it would be a good time to prevent a misbehaviour. Nothing
> prevents a user to get two properties' dialog for the same object.
>
> Comments?
>
>
> --
> Guillaume
>   http://blog.guillaume.lelarge.info
>   http://www.dalibo.com
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>

-- 
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-07-24 12:11:56
Subject: Re: Fixing issues between objects and properties dialogs
Previous:From: Guillaume LelargeDate: 2011-07-24 11:37:10
Subject: Fixing issues between objects and properties dialogs

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