Thread: Query tool margin
I'm a little unhappy about the big margin in the Query tool. Do we really need to waste the space for line numbers up to 999999? Calculation relative to font size would be needed. What happens to the "error in this line" marker, is it still displayed or does the SetMarginType suppress this? Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 04 November 2005 07:33 > To: Dave Page; pgadmin-hackers > Subject: Query tool margin > > I'm a little unhappy about the big margin in the Query tool. Do we > really need to waste the space for line numbers up to 999999? > Calculation relative to font size would be needed. > > What happens to the "error in this line" marker, is it still > displayed > or does the SetMarginType suppress this? It is still displayed on the far left of the margin. The sizing was based on being able to see the marker, and a line number up to 9999 on Mac, though I see it is a touch wider on win32. Anything wider, and the marker is drawn over the number. We can drop it down a touch so it'll display up to 999 if you like, or if you can tell me how to calculate the font width, I'll change it to 3 or 4 chars + marker width. /D
Dave Page wrote: > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 04 November 2005 07:33 >>To: Dave Page; pgadmin-hackers >>Subject: Query tool margin >> >>I'm a little unhappy about the big margin in the Query tool. Do we >>really need to waste the space for line numbers up to 999999? >>Calculation relative to font size would be needed. >> >>What happens to the "error in this line" marker, is it still >>displayed >>or does the SetMarginType suppress this? > > > It is still displayed on the far left of the margin. The sizing was > based on being able to see the marker, and a line number up to 9999 on > Mac, though I see it is a touch wider on win32. Anything wider, and the > marker is drawn over the number. > > We can drop it down a touch so it'll display up to 999 if you like, or > if you can tell me how to calculate the font width, I'll change it to 3 > or 4 chars + marker width. Use ConvertDialogToPixels. I'm still not happy, do we really need this? 999 wouldn't be enough, I do have bigger scripts. Additionally, screenshots need to be updated. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 04 November 2005 13:48 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: Query tool margin > > Use ConvertDialogToPixels. > I'm still not happy, do we really need this? 999 wouldn't be > enough, I > do have bigger scripts. Additionally, screenshots need to be updated. I ran into the problem very recently when debugging some functions - the backend helpfully told me where the problems were, but of course, I had a script, not the function itself in the window that reported the error. I found myself cutting and pasting the function source into an external editor to figure out which was line 543 or whatever. It became quite tedious as I'm sure you can imagine. I guess I could put the lline/column position of the cursor in the status bar if you prefer? I had figured it could already get quite full down there with query timings etc. (and I wouldn't worry about the screenshots - I doubt anyone will ever notice). /D
Dave Page wrote: > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 04 November 2005 13:48 >>To: Dave Page >>Cc: pgadmin-hackers >>Subject: Re: Query tool margin >> >>Use ConvertDialogToPixels. >>I'm still not happy, do we really need this? 999 wouldn't be >>enough, I >>do have bigger scripts. Additionally, screenshots need to be updated. > > > I ran into the problem very recently when debugging some functions - the > backend helpfully told me where the problems were, but of course, I had > a script, not the function itself in the window that reported the error. The marker should show you the failing line, observing an offset if executed from a marked range; is that broken? Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 04 November 2005 14:03 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: Query tool margin > > Dave Page wrote: > > > > > > > >>-----Original Message----- > >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > >>Sent: 04 November 2005 13:48 > >>To: Dave Page > >>Cc: pgadmin-hackers > >>Subject: Re: Query tool margin > >> > >>Use ConvertDialogToPixels. > >>I'm still not happy, do we really need this? 999 wouldn't be > >>enough, I > >>do have bigger scripts. Additionally, screenshots need to > be updated. > > > > > > I ran into the problem very recently when debugging some > functions - the > > backend helpfully told me where the problems were, but of > course, I had > > a script, not the function itself in the window that > reported the error. > > The marker should show you the failing line, observing an offset if > executed from a marked range; is that broken? No, the function is not in the editor that reports the error, a script that calls it is. The best we can do with the marker in this case is mark the function call. The error from the backend tells me there is a problem on line X of the marked function, which I then investigate in a separate query window (with the create or replace function source). Which do you prefer - margin or status bar? Running low on time... :-) /D
Dave Page wrote: > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 04 November 2005 14:03 >>To: Dave Page >>Cc: pgadmin-hackers >>Subject: Re: Query tool margin >> >>Dave Page wrote: >> >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>>>Sent: 04 November 2005 13:48 >>>>To: Dave Page >>>>Cc: pgadmin-hackers >>>>Subject: Re: Query tool margin >>>> >>>>Use ConvertDialogToPixels. >>>>I'm still not happy, do we really need this? 999 wouldn't be >>>>enough, I >>>>do have bigger scripts. Additionally, screenshots need to >> >>be updated. >> >>> >>>I ran into the problem very recently when debugging some >> >>functions - the >> >>>backend helpfully told me where the problems were, but of >> >>course, I had >> >>>a script, not the function itself in the window that >> >>reported the error. >> >>The marker should show you the failing line, observing an offset if >>executed from a marked range; is that broken? > > > No, the function is not in the editor that reports the error, a script > that calls it is. The best we can do with the marker in this case is > mark the function call. The error from the backend tells me there is a > problem on line X of the marked function, which I then investigate in a > separate query window (with the create or replace function source). The function editor already has the line number margin. I hate it, reminds me of C64 BASIC... Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 04 November 2005 14:11 > To: Dave Page > Cc: pgadmin-hackers > Subject: Re: Query tool margin > > The function editor already has the line number margin. I hate it, > reminds me of C64 BASIC... OK, status bar it is then... /D