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

Fixing issues between objects and properties dialogs

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Fixing issues between objects and properties dialogs
Date: 2011-07-24 11:37:10
Message-ID: 1311507431.2130.31.camel@laptop (view raw or flat)
Thread:
Lists: pgadmin-hackers
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


Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2011-07-24 11:58:07
Subject: Re: Fixing issues between objects and properties dialogs
Previous:From: Guillaume LelargeDate: 2011-07-24 08:58:23
Subject: Patch to add support for security labels on local objects

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