Thread: extending functionality strategy

extending functionality strategy

From
"Gevik Babakhani"
Date:
Hi,

I would like to have some guidelines regarding extending functionality
within pgadmin.

The following are two modules which I am thinking about adding to pgadmin as
a built-in or if possible plug-in.

1) A custom type creator. For creating function return types. We heavily
make use of functions that are stored procedure ported from MSSQL. Perhaps
this would be useful to others too.

2) A sequence synchronizer. Up on importing from other DBs, It would be
useful to have a mechanism where one can synchronize sequences by max(table
id)+1.

Any thoughts?


Regards,
Gevik
http://www.truesoftware.net/gevik/


Re: extending functionality strategy

From
"Dave Page"
Date:
Hi Gevik

On Wed, Oct 15, 2008 at 11:45 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
> Hi,
>
> I would like to have some guidelines regarding extending functionality
> within pgadmin.
>
> The following are two modules which I am thinking about adding to pgadmin as
> a built-in or if possible plug-in.
>
> 1) A custom type creator. For creating function return types. We heavily
> make use of functions that are stored procedure ported from MSSQL. Perhaps
> this would be useful to others too.

Can you describe this in more detail? We can already manage and create
types in pgAdmin (albeit our support for complex types requiring an
initial 'shell' type is somewhat lacking).

> 2) A sequence synchronizer. Up on importing from other DBs, It would be
> useful to have a mechanism where one can synchronize sequences by max(table
> id)+1.

I think that makes sense if pgAdmin were doing the data import. As a
standalone function I don't think it would be obvious what it was for.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> Can you describe this in more detail? We can already manage

It was late last night. I will try to explain it better.

> and create types in pgAdmin (albeit our support for complex
> types requiring an initial 'shell' type is somewhat lacking).

I was playing with GQD and got this idea to have a similar functionality
except instead of generating a SELECT statement, to generate a CREATE TYPE
....

Looking at the current type creator:

1) Perhaps it could be extended with an additional tab where one is able to
click and select table columns.
2) Like the GQD add column ordering to the Definition tab for rearranging.
3) I haven't given this much thought but yet another idea is to create a
type based on a SELECT statement. (have something similar in C#)

Regards,
Gevik



Re: extending functionality strategy

From
"Dave Page"
Date:
On Thu, Oct 16, 2008 at 9:22 AM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
>> Can you describe this in more detail? We can already manage
>
> It was late last night. I will try to explain it better.
>
>> and create types in pgAdmin (albeit our support for complex
>> types requiring an initial 'shell' type is somewhat lacking).
>
> I was playing with GQD and got this idea to have a similar functionality
> except instead of generating a SELECT statement, to generate a CREATE TYPE
> ....
>
> Looking at the current type creator:
>
> 1) Perhaps it could be extended with an additional tab where one is able to
> click and select table columns.

To use as a template? That's not really functionality for the
straightforward properties dialogue though.

> 2) Like the GQD add column ordering to the Definition tab for rearranging.

For consistency, we'd have to add similar buttons to a whole bunch of
other places.

> 3) I haven't given this much thought but yet another idea is to create a
> type based on a SELECT statement. (have something similar in C#)

Most of what you propose would not be implemented in the type dialogue
itself, but would be something for a wizard - but I don't think there
are enough people who actually create types in pgAdmin to justify the
effort - espcially as once we create oe wizard such as this, it pretty
much implies we will have to create others as we move forward.

Now if you implemented it as a Python based plugin, that would perhaps
be a different matter (but would of course, require the plugin
architecture to be built!)

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> To use as a template? That's not really functionality for the
> straightforward properties dialogue though.

After some experimenting I have to admit, adding a new tab to the type
editor will not do. I have to come up with a better solution then.


> > 2) Like the GQD add column ordering to the Definition tab
> for rearranging.
>
> For consistency, we'd have to add similar buttons to a whole
> bunch of other places.
>

If this will be acceptable by the core team, I am going to experiment with
an ordering mechanism just like the one in the GQD. It will have to be in
such way that we can reuse it in other places too.

> Now if you implemented it as a Python based plugin, that
> would perhaps be a different matter (but would of course,
> require the plugin architecture to be built!)

I see :)


Re: extending functionality strategy

From
"Dave Page"
Date:
On Fri, Oct 17, 2008 at 9:14 AM, Gevik Babakhani <pgdev@xs4all.nl> wrote:

> If this will be acceptable by the core team, I am going to experiment with
> an ordering mechanism just like the one in the GQD. It will have to be in
> such way that we can reuse it in other places too.

I think the first thing to do is a quick inventory of the lists where
we might need to do this.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> I think the first thing to do is a quick inventory of the
> lists where we might need to do this.

This is of course needed to be done in order to continue with an item
ordering/arranging solution. But before we continue we should know that most
of the lists we use in PGAdmin are of wxListView type (wxListCtrl) which
have no built-in way to set the item ordering (item index). This leaves us
with a hacky solution which involves using ItemData from wxListItem. This
means that item ordering/arranging cannot be done when one of our
wxListViews uses wxListItem::ItemData. Any thoughts?

Regards,
Gevik
http://www.truesoftware.net/gevik/





Re: extending functionality strategy

From
"Dave Page"
Date:
On Sat, Oct 18, 2008 at 10:43 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
>> I think the first thing to do is a quick inventory of the
>> lists where we might need to do this.
>
> This is of course needed to be done in order to continue with an item
> ordering/arranging solution. But before we continue we should know that most
> of the lists we use in PGAdmin are of wxListView type (wxListCtrl) which
> have no built-in way to set the item ordering (item index). This leaves us
> with a hacky solution which involves using ItemData from wxListItem. This
> means that item ordering/arranging cannot be done when one of our
> wxListViews uses wxListItem::ItemData. Any thoughts?

Well the other way is to remove the item to be moved, and re-insert it
with a new index.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> Well the other way is to remove the item to be moved, and
> re-insert it with a new index.

I am actually experimenting with this. So far I have a custom widget
(wxListItemArranger) which takes a wxListCtrl as ctor argument, and has 4
ordering buttons. There is some event handing that are dynamically bound to
the wxListCtrl. Ones I get the actual ordering working, (assuming wxListItem
removing and inserting will result) I can send a small demonstration patch
just for one wxListCtrl/wxListView. From there you guys can decide whether
to continue implementing it for other wxListCtrls.

...snip...

    wxListCtrl *listView = new
wxListCtrl(this,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxLC_REPORT |
wxLC_SINGLE_SEL);
    wxListItemArranger *lia = new
wxListItemArranger(this,wxID_ANY,listView);

...snip...

All my wxWidgets frustrations flashback again.... (where are my heart attack
pills)... Perhaps PGAdmin IV in QT4?

Regards,
Gevik


Re: extending functionality strategy

From
"Dave Page"
Date:
On Mon, Oct 20, 2008 at 10:51 AM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
>> Well the other way is to remove the item to be moved, and
>> re-insert it with a new index.
>
> I am actually experimenting with this. So far I have a custom widget
> (wxListItemArranger) which takes a wxListCtrl as ctor argument, and has 4
> ordering buttons. There is some event handing that are dynamically bound to
> the wxListCtrl. Ones I get the actual ordering working, (assuming wxListItem
> removing and inserting will result) I can send a small demonstration patch
> just for one wxListCtrl/wxListView. From there you guys can decide whether
> to continue implementing it for other wxListCtrls.

OK.

> ...snip...
>
>        wxListCtrl *listView = new
> wxListCtrl(this,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxLC_REPORT |
> wxLC_SINGLE_SEL);
>        wxListItemArranger *lia = new
> wxListItemArranger(this,wxID_ANY,listView);

Why not just derive a new control from wxListView?

> All my wxWidgets frustrations flashback again.... (where are my heart attack
> pills)... Perhaps PGAdmin IV in QT4?
>

D'oh! Well, if it hadn't had such nasty licencing when we started
pgAdmin 3, we might have used it. As for pgAdmin IV, let us know when
you're 95% done :-p


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> Why not just derive a new control from wxListView?

I haven't experimented with deriving from wxListView because I didn't want
to do custom drawing within wxListCtrl. It seems to be very hard to get it
working for all the platforms. Especially when I am limited in platforms to
test it on.

> D'oh! Well, if it hadn't had such nasty licencing when we
> started pgAdmin 3, we might have used it. As for pgAdmin IV,
> let us know when you're 95% done :-p

I read QT4 for Windows needs no licensing to build open source windows/osx
apps. I guess the licensing problem is no more ;)
How many man days would you say it is needed to port to QT4... (Hiding
behind the fence and asking very carefully... :)

Regards,
Gevik


Re: extending functionality strategy

From
"Dave Page"
Date:
On Mon, Oct 20, 2008 at 12:13 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:

>> D'oh! Well, if it hadn't had such nasty licencing when we
>> started pgAdmin 3, we might have used it. As for pgAdmin IV,
>> let us know when you're 95% done :-p
>
> I read QT4 for Windows needs no licensing to build open source windows/osx
> apps. I guess the licensing problem is no more ;)

Yeah - thats my point; when we started, it did have those restrictions.

> How many man days would you say it is needed to port to QT4... (Hiding
> behind the fence and asking very carefully... :)

Having never used QT, I have no idea. I have little doubt you would
better measuring in man-months though.


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> Having never used QT, I have no idea. I have little doubt you
> would better measuring in man-months though.

I can do an impact analysis if you are remotely considering moving away from
wxWidgets :)

Regards,
Gevik


Re: extending functionality strategy

From
"Dave Page"
Date:
On Mon, Oct 20, 2008 at 1:52 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
>> Having never used QT, I have no idea. I have little doubt you
>> would better measuring in man-months though.
>
> I can do an impact analysis if you are remotely considering moving away from
> wxWidgets :)

I can't honestly say it's very high on the priority list.



--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
Hereby a v1.0 patch implementing basic ordering for a wxListCtrl:

- The patch is developed using MSVC 2008.
- 2 new source files ctl\ListItemArranger.cpp and include\ListItemArranger.h
are added.
- 4 new image file are added in include\images (wxListItemArranger*.xpm)
- For demo the dlgType.xrc and dlgType.cpp are modified.
- 2 mk files modified manually.
- After patching run embed-xrc
- For compiling with MSVC the two source files must be added manually to ctl
and include filters inside VS2005/2008.
- For testing: Goto "add new composite type" then the definition tab.

Please let me know what you think.

regards,
Gevik.



> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of Dave Page
> Sent: Monday, October 20, 2008 3:10 PM
> To: Gevik Babakhani
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] extending functionality strategy
>
> On Mon, Oct 20, 2008 at 1:52 PM, Gevik Babakhani
> <pgdev@xs4all.nl> wrote:
> >> Having never used QT, I have no idea. I have little doubt
> you would
> >> better measuring in man-months though.
> >
> > I can do an impact analysis if you are remotely considering moving
> > away from wxWidgets :)
>
> I can't honestly say it's very high on the priority list.
>
>
>
> --
> Dave Page
> EnterpriseDB UK:   http://www.enterprisedb.com
>
> --
> Sent via pgadmin-hackers mailing list
> (pgadmin-hackers@postgresql.org) To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>

Attachment

Re: extending functionality strategy

From
"Dave Page"
Date:
On Mon, Oct 20, 2008 at 11:59 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
> Hereby a v1.0 patch implementing basic ordering for a wxListCtrl:
>
> - The patch is developed using MSVC 2008.
> - 2 new source files ctl\ListItemArranger.cpp and include\ListItemArranger.h
> are added.
> - 4 new image file are added in include\images (wxListItemArranger*.xpm)
> - For demo the dlgType.xrc and dlgType.cpp are modified.
> - 2 mk files modified manually.
> - After patching run embed-xrc
> - For compiling with MSVC the two source files must be added manually to ctl
> and include filters inside VS2005/2008.
> - For testing: Goto "add new composite type" then the definition tab.
>
> Please let me know what you think.

Hi Gevik,

Sorry for the delay in looking at this. A few (minor comments)

- The buttons should not become active when viewing an existing type.

- The background of the button area needs to be transparent. See the
attached screenshot and you'll see why.

- Please follow existing naming conventions - eg. use
ctlListItemArranger, per the other custom controls.

- Please retain the comments and grouping on the includes - it helps
prevent people mistakenly re-ordering things they shouldn't - eg.

// Main app header
#include "pgAdmin3.h"

// wxWindows headers
#include <wx/wx.h>
#include <wx/listctrl.h>

// App headers
#include "ctl/ListItemArranger.h"

They should almost always be in that order (one exception being
wx/regex.h which seems to need to be last usually). I appreciate that
we have some inonsistencies at the moment which do need improvement...

Thanks, Dave.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Attachment

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
Hi Dave,

Thank you for reviewing :)

> - The buttons should not become active when viewing an existing type.
Done.

> - The background of the button area needs to be transparent.
> See the attached screenshot and you'll see why.

Making the background transparent (for wxPanel) proved to be very hard in
wxWidgets. After a lot of googling and testing I managed to imitate the
background gradient. I do this only for wxWIN. It should work without this
hack on wxGTK and wxMAC.

> - Please follow existing naming conventions - eg. use
> ctlListItemArranger, per the other custom controls.

Done. (I hope I did it right)

Please find the changes in a new patch to review. Please also run embed-xrc
again.

I have also modified the .mk files. But at this moment I have no way of
testing on wxGTK and wxMAC.

Regards,
Gevik
http://www.truesoftware.net/gevik/

Attachment

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
Hi Dave,

This is a quick inventory of all the listviews I could find. Some of them
can be extended with list item arranger.

Any thoughts ?

Regards,
Gevik
http://www.truesoftware.net/gevik/


New Database:
    - Variables
    - Privileges

Schemas:
    - Privileges

Function and Trigger Function:
    Grant Wizard:
        - Privileges

    New/Edit Function:
        - Parameters
        - Variables
        - Privileges

Sequences:
    Grant Wizard:
        - Privileges

    New/Edit sequences:
        - Privileges

Tables:
    Grant Wizard:
        - Privileges

    New/Edit Table:
        - Columns
        - Constraints
        - Privileges
Type:
    - Definition
    - Enumeration

View:
    - Privileges






Re: extending functionality strategy

From
"Dave Page"
Date:
On Wed, Oct 29, 2008 at 9:29 AM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
> Hi Dave,
>
> This is a quick inventory of all the listviews I could find. Some of them
> can be extended with list item arranger.
>
> Any thoughts ?

Hi,

Many of those won't need arranging - for example, variables and
privilege lists. We should restrict the use of the control to those
cases where ordering is important, functionally or aesthetically - eg,
function parameters, table columns, composite type members etc.

Regards, Dave.

>
> New Database:
>        - Variables
>        - Privileges
>
> Schemas:
>        - Privileges
>
> Function and Trigger Function:
>        Grant Wizard:
>                - Privileges
>
>        New/Edit Function:
>                - Parameters
>                - Variables
>                - Privileges
>
> Sequences:
>        Grant Wizard:
>                - Privileges
>
>        New/Edit sequences:
>                - Privileges
>
> Tables:
>        Grant Wizard:
>                - Privileges
>
>        New/Edit Table:
>                - Columns
>                - Constraints
>                - Privileges
> Type:
>        - Definition
>        - Enumeration
>
> View:
>        - Privileges
>
>
>
>
>
>



--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Dave Page"
Date:
Hi Gevik

On Tue, Oct 28, 2008 at 10:47 AM, Gevik Babakhani <pgdev@xs4all.nl> wrote:

> Please find the changes in a new patch to review. Please also run embed-xrc
> again.

That's only actually required for release builds - debug use the XRC
files directly (and reload them each time a dialogue is invoked).

> I have also modified the .mk files. But at this moment I have no way of
> testing on wxGTK and wxMAC.

Looks good on Windows, but is a little borked on Mac (see the attached
screenshot). Unfortunately I'm still pretty busy atm, so haven't had
time to figure out exactly what is wrong with the XRC code - I played
for 10 minutes or so, but didn't get anywhere. It did strike me though
that we really shouldn't have to deal with this in every XRC file
anyway - that's just a chore as we move forward. I think the derived
control is perhaps the best option - and I'm not sure it would
actually be any more work than getting this right.


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Attachment

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
Dave,

Thank you for reviewing :)

> Looks good on Windows, but is a little borked on Mac (see the
> attached screenshot). Unfortunately I'm still pretty busy
> atm, so haven't had time to figure out exactly what is wrong
> with the XRC code - I played for 10 minutes or so, but didn't
> get anywhere. It did strike me though that we really
> shouldn't have to deal with this in every XRC file anyway -
> that's just a chore as we move forward. I think the derived
> control is perhaps the best option - and I'm not sure it
> would actually be any more work than getting this right.

I think I know what it is. It is the item padding within the sizers that
need to be tweaked a little. I have also investigated this with a derived
control. It proved to be very hard to add composite elements within a
wxListCtrl, that is why I gave up on that solution.

I understand you are very busy atm. This has no rush. Perhaps I can play
around a little more to see if I can find a solution. I need to find
somewhere to test this on a MAC :)


Kind regards,
Gevik.


Re: extending functionality strategy

From
Guillaume Lelarge
Date:
Gevik Babakhani a écrit :
> Hi Dave,
>
> Thank you for reviewing :)
>
>> - The buttons should not become active when viewing an existing type.
> Done.
>

They're still active for me.

>> - The background of the button area needs to be transparent.
>> See the attached screenshot and you'll see why.
>
> Making the background transparent (for wxPanel) proved to be very hard in
> wxWidgets. After a lot of googling and testing I managed to imitate the
> background gradient. I do this only for wxWIN. It should work without this
> hack on wxGTK and wxMAC.
>

I just checked on GTK. It works.

>> - Please follow existing naming conventions - eg. use
>> ctlListItemArranger, per the other custom controls.
>
> Done. (I hope I did it right)
>
> Please find the changes in a new patch to review. Please also run embed-xrc
> again.
>
> I have also modified the .mk files. But at this moment I have no way of
> testing on wxGTK and wxMAC.
>

include/images/ctllistitemarrangerFirst.xpm should be renamed
include/images/ctlListItemArrangerFirst.xpm (notice the upper case in
the filename).

I still need to read the code but it seems a good addition. Thanks, Gevik.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
> >> - The buttons should not become active when viewing an
> existing type.
> > Done.
> >
>
> They're still active for me.

They should not be active when editing an existing type. Did your try patch
#2? I thought I renamed the file to uppercase there.


Thank you for reviewing

Regards,
Gevik
http://www.truesoftware.net/gevik/



Re: extending functionality strategy

From
Guillaume Lelarge
Date:
Gevik Babakhani a écrit :
>>>> - The buttons should not become active when viewing an
>> existing type.
>>> Done.
>>>
>> They're still active for me.
>
> They should not be active when editing an existing type. Did your try patch
> #2? I thought I renamed the file to uppercase there.
>

I only used #2 patch.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
Hi all,

Update regarding the patch:

- I finally was able to test the patch (#2) on CentOS 5.2/GTK. It works as
expected.
- After some investigation and tests, I found no easy way to subclass the
wxListCtrl in order to not change the xrc files.
- In order to fix the broken padding in OSX, I have to fiddle around with
item padding in the xrc file which I have no way of testing at this moment.

I would like to know whether the item ordering/arranger is worth developing
further. Please let me know.

regards,
Gevik.




> -----Original Message-----
> From: Guillaume Lelarge [mailto:guillaume@lelarge.info]
> Sent: Wednesday, October 29, 2008 1:48 PM
> To: Gevik Babakhani
> Cc: 'Dave Page'; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] extending functionality strategy
>
> Gevik Babakhani a écrit :
> >>>> - The buttons should not become active when viewing an
> >> existing type.
> >>> Done.
> >>>
> >> They're still active for me.
> >
> > They should not be active when editing an existing type.
> Did your try
> > patch #2? I thought I renamed the file to uppercase there.
> >
>
> I only used #2 patch.
>
>
> --
> Guillaume.
>  http://www.postgresqlfr.org
>  http://dalibo.com
>


Re: extending functionality strategy

From
"Dave Page"
Date:
On Fri, Nov 7, 2008 at 2:46 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
> Hi all,
>
> Update regarding the patch:
>
> - I finally was able to test the patch (#2) on CentOS 5.2/GTK. It works as
> expected.
> - After some investigation and tests, I found no easy way to subclass the
> wxListCtrl in order to not change the xrc files.
> - In order to fix the broken padding in OSX, I have to fiddle around with
> item padding in the xrc file which I have no way of testing at this moment.
>
> I would like to know whether the item ordering/arranger is worth developing
> further. Please let me know.

Well, I think it's a nice idea, and can probably do some Mac fiddling
(assuming you can wait until I get the time). I'm still not entirely
sure I like the design though.

Ashesh; is this something you'd like to look at as a spare time mini
project? (feel free to say no - I have plenty more for your to get
stuck into :-p ).

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
Ashesh Vashi
Date:
Dave Page wrote:
On Fri, Nov 7, 2008 at 2:46 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote: 
Hi all,

Update regarding the patch:

- I finally was able to test the patch (#2) on CentOS 5.2/GTK. It works as
expected.
- After some investigation and tests, I found no easy way to subclass the
wxListCtrl in order to not change the xrc files.
- In order to fix the broken padding in OSX, I have to fiddle around with
item padding in the xrc file which I have no way of testing at this moment.

I would like to know whether the item ordering/arranger is worth developing
further. Please let me know.   
Well, I think it's a nice idea, and can probably do some Mac fiddling
(assuming you can wait until I get the time). I'm still not entirely
sure I like the design though.

Ashesh; is this something you'd like to look at as a spare time mini
project? (feel free to say no - I have plenty more for your to get
stuck into :-p ). 
I would like work on it.
Sorry for a bit late answer.
I had to go through the whole thread (downloaded from mailing archive) before answering the question.

Regards,
Ashesh

Re: extending functionality strategy

From
"Dave Page"
Date:
On Mon, Nov 10, 2008 at 6:59 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Dave Page wrote:
>
>> Ashesh; is this something you'd like to look at as a spare time mini
>> project? (feel free to say no - I have plenty more for your to get
>> stuck into :-p ).
>
>
> I would like work on it.
> Sorry for a bit late answer.
> I had to go through the whole thread (downloaded from mailing archive)
> before answering the question.

Thanks.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
Thinking about new solutions....

Perhaps we could create a composite type (a wxPanel hosting a wxListCtrl and
the buttons) that has an interface like the wxListCtrl. This way we should
not need to change the xrc files.

Any idea's

> -----Original Message-----
> From: Dave Page [mailto:dpage@pgadmin.org]
> Sent: Monday, November 10, 2008 11:46 AM
> To: Ashesh Vashi
> Cc: Gevik Babakhani; Guillaume Lelarge; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] extending functionality strategy
>
> On Mon, Nov 10, 2008 at 6:59 AM, Ashesh Vashi
> <ashesh.vashi@enterprisedb.com> wrote:
> > Dave Page wrote:
> >
> >> Ashesh; is this something you'd like to look at as a spare
> time mini
> >> project? (feel free to say no - I have plenty more for your to get
> >> stuck into :-p ).
> >
> >
> > I would like work on it.
> > Sorry for a bit late answer.
> > I had to go through the whole thread (downloaded from
> mailing archive)
> > before answering the question.
>
> Thanks.
>
> --
> Dave Page
> EnterpriseDB UK:   http://www.enterprisedb.com
>


Re: extending functionality strategy

From
"Dave Page"
Date:
On Mon, Nov 10, 2008 at 3:41 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
> Thinking about new solutions....
>
> Perhaps we could create a composite type (a wxPanel hosting a wxListCtrl and
> the buttons) that has an interface like the wxListCtrl. This way we should
> not need to change the xrc files.
>

That should be possible. Are you going to give it a go?


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
Ashesh D Vashi
Date:


Dave Page wrote:
On Mon, Nov 10, 2008 at 3:41 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote: 
Thinking about new solutions....

Perhaps we could create a composite type (a wxPanel hosting a wxListCtrl and
the buttons) that has an interface like the wxListCtrl. This way we should
not need to change the xrc files.
   
That should be possible. Are you going to give it a go? 
I was trying the same earlier, but did not get any success. :(
May be - I am not much familiar with wxWidgets.

Regards,
Ashesh


Re: extending functionality strategy

From
"Dave Page"
Date:
On Wed, Nov 12, 2008 at 9:41 AM, Ashesh D Vashi
<ashesh.vashi@enterprisedb.com> wrote:
>
>
> Dave Page wrote:
>
> On Mon, Nov 10, 2008 at 3:41 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
>
>
> Thinking about new solutions....
>
> Perhaps we could create a composite type (a wxPanel hosting a wxListCtrl and
> the buttons) that has an interface like the wxListCtrl. This way we should
> not need to change the xrc files.
>
>
>
> That should be possible. Are you going to give it a go?
>
>
> I was trying the same earlier, but did not get any success. :(
> May be - I am not much familiar with wxWidgets.

OK, no problem - I did throw you in at the deep end somewhat :-)

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
"Gevik Babakhani"
Date:
I can give it a try. The xrc file(s) will have a minor change anyway by
replacing wxListCtrl with the "unknown" placeholder which then is populated
with the composite control in the code.


> -----Original Message-----
> From: Dave Page [mailto:dpage@pgadmin.org]
> Sent: Wednesday, November 12, 2008 10:44 AM
> To: Ashesh D Vashi
> Cc: Gevik Babakhani; Guillaume Lelarge; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] extending functionality strategy
>
> On Wed, Nov 12, 2008 at 9:41 AM, Ashesh D Vashi
> <ashesh.vashi@enterprisedb.com> wrote:
> >
> >
> > Dave Page wrote:
> >
> > On Mon, Nov 10, 2008 at 3:41 PM, Gevik Babakhani
> <pgdev@xs4all.nl> wrote:
> >
> >
> > Thinking about new solutions....
> >
> > Perhaps we could create a composite type (a wxPanel hosting a
> > wxListCtrl and the buttons) that has an interface like the
> wxListCtrl.
> > This way we should not need to change the xrc files.
> >
> >
> >
> > That should be possible. Are you going to give it a go?
> >
> >
> > I was trying the same earlier, but did not get any success.
> :( May be
> > - I am not much familiar with wxWidgets.
>
> OK, no problem - I did throw you in at the deep end somewhat :-)
>
> --
> Dave Page
> EnterpriseDB UK:   http://www.enterprisedb.com


Re: extending functionality strategy

From
Ashesh D Vashi
Date:
Hi All,

I give a try on this.
* Created a combined component using wxPanel, which contains ctlCtrlView & arranger buttons both.

It is just a simple development patch.
Lot of modifications will be needed.

Please review it.

Regards,
Ashesh

Gevik Babakhani wrote:
I can give it a try. The xrc file(s) will have a minor change anyway by
replacing wxListCtrl with the "unknown" placeholder which then is populated
with the composite control in the code.

 
-----Original Message-----
From: Dave Page [mailto:dpage@pgadmin.org] 
Sent: Wednesday, November 12, 2008 10:44 AM
To: Ashesh D Vashi
Cc: Gevik Babakhani; Guillaume Lelarge; pgadmin-hackers@postgresql.org
Subject: Re: [pgadmin-hackers] extending functionality strategy

On Wed, Nov 12, 2008 at 9:41 AM, Ashesh D Vashi 
<ashesh.vashi@enterprisedb.com> wrote:   
Dave Page wrote:

On Mon, Nov 10, 2008 at 3:41 PM, Gevik Babakhani      
<pgdev@xs4all.nl> wrote:   
Thinking about new solutions....

Perhaps we could create a composite type (a wxPanel hosting a 
wxListCtrl and the buttons) that has an interface like the      
wxListCtrl.    
This way we should not need to change the xrc files.



That should be possible. Are you going to give it a go?


I was trying the same earlier, but did not get any success.      
:( May be    
- I am not much familiar with wxWidgets.     
OK, no problem - I did throw you in at the deep end somewhat :-)

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com   
 

Re: extending functionality strategy

From
"Dave Page"
Date:
On Tue, Nov 18, 2008 at 1:12 PM, Ashesh D Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Hi All,
>
> I give a try on this.
> * Created a combined component using wxPanel, which contains ctlCtrlView &
> arranger buttons both.
>
> It is just a simple development patch.
> Lot of modifications will be needed.

I think you missed couple of files:

xh_ctlListArranger.h
xh_ctlListArranger.cpp

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: extending functionality strategy

From
Ashesh D Vashi
Date:
Hi Dave Page,

Dave Page wrote:
I think you missed couple of files:

xh_ctlListArranger.h
xh_ctlListArranger.cpp 
You are right.
I missed to added two files: :(
* ctl/ctlListItemArranger.cpp
* include/ctl/ctlListArranger.h

Please find the updated patch.

Regards,
Ashesh

Re: extending functionality strategy

From
Ashesh D Vashi
Date:
Forgot to say that, you can see the list-arranger in "Create Type" dialog.
This is just a rough design.

I am looking forward to your feedbacks for further improvements.

Regards,
Ashesh

Ashesh D Vashi wrote:
Hi Dave Page,

Dave Page wrote:
I think you missed couple of files:

xh_ctlListArranger.h
xh_ctlListArranger.cpp 
You are right.
I missed to added two files: :(
* ctl/ctlListItemArranger.cpp
* include/ctl/ctlListArranger.h

Please find the updated patch.

Regards,
Ashesh

Re: extending functionality strategy

From
"Dave Page"
Date:
On Thu, Nov 20, 2008 at 3:01 PM, Ashesh D Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Forgot to say that, you can see the list-arranger in "Create Type" dialog.
> This is just a rough design.
>
> I am looking forward to your feedbacks for further improvements.

It crashes for me if I try to open dlgType :-(

Thread 0 Crashed:
0   pgAdmin3-Debug                    0x0003f076
ctlListView::CreateColumns(wxImageList*, wxString const&, wxString
const&, int) + 342
1   pgAdmin3-Debug                    0x0012f0ec
dlgType::dlgType(pgaFactory*, frmMain*, pgType*, pgSchema*) + 460
2   pgAdmin3-Debug                    0x0012f47e
pgTypeFactory::CreateDialog(frmMain*, pgObject*, pgObject*) + 62
3   pgAdmin3-Debug                    0x000de2f3
dlgProperty::CreateDlg(frmMain*, pgObject*, bool, pgaFactory*) + 99
4   pgAdmin3-Debug                    0x000e5346
dlgProperty::EditObjectDialog(frmMain*, ctlSQLBox*, pgObject*) + 166
5   pgAdmin3-Debug                    0x000e5863
propertyFactory::StartDialog(frmMain*, pgObject*) + 35
6   pgAdmin3-Debug                    0x00139906
frmMain::OnAction(wxCommandEvent&) + 70


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com