Re: [Lazarus] TDBGrid broken in svn fixes_0_9_30
On Monday 13 of June 2011 00:57:21 Erwin van den Bosch wrote: Op 13-06-11 00:32, Bart schreef: Please define does not work and looks weird (attach screenshot perhaps). Can't you reproduce it? #DEFINE Does_not_work = Does not work at all. No grid lines. No header. Nothing. I can attach a screenshot but if you can't reproduce it a screenshot will not help too. Have you test it? It happens on Linux with QT. Same problem exist with trunk? I don't know. I'm on the stable branch. Just dropped an TDBGrid onto form and it looks ok (trunk lazarus). zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TDBGrid broken in svn fixes_0_9_30
Op 13-6-2011 8:06, zeljko schreef: Same problem exist with trunk? I don't know. I'm on the stable branch. Just dropped an TDBGrid onto form and it looks ok (trunk lazarus). Zeljko, have you tested the fixes branch? I'm on the fixes branch. I will test the trunk tree today. (First some coffee) Regards, Erwin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TDBGrid broken in svn fixes_0_9_30
Op 13-06-11 08:46, Erwin van den Bosch schreef: Op 13-6-2011 8:06, zeljko schreef: Same problem exist with trunk? I don't know. I'm on the stable branch. Just dropped an TDBGrid onto form and it looks ok (trunk lazarus). Zeljko, have you tested the fixes branch? I'm on the fixes branch. I will test the trunk tree today. (First some coffee) Just checked it on the trunk tree. And it looks good. No problem. Just for sure I checked out a fresh clean fixes branch and there the problem was again. Looks like a painting problem in TDBGrid. Maybe something went wrong with an svnmerge on the branch fixes_0_9_30? So it seems you have to checkout the fixes branch to see this bug. Regards, Erwin. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TDBGrid broken in svn fixes_0_9_30
On Monday 13 of June 2011 10:02:52 Erwin van den Bosch wrote: Op 13-06-11 08:46, Erwin van den Bosch schreef: Op 13-6-2011 8:06, zeljko schreef: Same problem exist with trunk? I don't know. I'm on the stable branch. Just dropped an TDBGrid onto form and it looks ok (trunk lazarus). Zeljko, have you tested the fixes branch? I'm on the fixes branch. I will test the trunk tree today. (First some coffee) Just checked it on the trunk tree. And it looks good. No problem. Just for sure I checked out a fresh clean fixes branch and there the problem was again. Looks like a painting problem in TDBGrid. Maybe something went wrong with an svnmerge on the branch fixes_0_9_30? Don't know, no time to test fixes_0_9_30 atm ... z. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TDBGrid broken in svn fixes_0_9_30
Op 13-06-11 12:40, zeljko schreef: Don't know, no time to test fixes_0_9_30 atm ... z. I compared the file lcl/interfaces/qt/qtwinapi.inc in fixes_0_9_30 with the one in trunk. Find a few lines of code that wasn't in the trunk tree. Fixed the bug in the attached patch. Regards, Erwin. Index: lcl/interfaces/qt/qtwinapi.inc === --- lcl/interfaces/qt/qtwinapi.inc (revision 31198) +++ lcl/interfaces/qt/qtwinapi.inc (working copy) @@ -758,8 +758,6 @@ QtRegion: TQtRegion; begin QtRegion := TQtRegion.Create(True, X1, Y1, X2, Y2); - if (X1 0) or (Y1 0) then -QtRegion.translate(X1, Y1); Result := HRGN(QtRegion); {$ifdef VerboseQtWinAPI} WriteLn('Trace: [WinAPI CreateRectRgn] Result: ', dbghex(Result), -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TDBGrid broken in svn fixes_0_9_30
On Monday 13 of June 2011 13:47:14 Erwin van den Bosch wrote: Op 13-06-11 12:40, zeljko schreef: Don't know, no time to test fixes_0_9_30 atm ... z. I compared the file lcl/interfaces/qt/qtwinapi.inc in fixes_0_9_30 with the one in trunk. Find a few lines of code that wasn't in the trunk tree. Fixed the bug in the attached patch. Thanks for searching, r30608 should be merged in that case.I'll inform Juha about this. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] EmbWeb: Moving between webapp type caveats
It's not always possible to get the Application-URL. That's a problem with other server-side weblanguages too. Maybe... the PHP framework I use require me to specify the base URL (relative from the host:port) like /myproj/ for http://localhost:8080/myproj/ assuming the webserver is listening at localhost on port 8080. But only up to that point, the other parts are determined from the environment variables (I guess). Back to the problem, using relative URL is not a solution as well. When I do http://localhost/proj/proj.cgi/module/action then if somewhere I put public/style/style.css then the link becomes: http://localhost/proj/proj.cgi/module/public/style/style.css, regardless of the webapp type (at least on Chrome, don't know about other browsers). Isn't there really a way somehow? -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/EmbWeb-Moving-between-webapp-type-caveats-tp3053108p3059323.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Setting SQL locale
When using the standard DB components connecting to e.g. a PostgreSQL backend, is there an event that fires between the connection being established and the query being issued? I'm trying to send a SET TIMEZONE command to the server, to get DST correction applied to the resultset. This has to be done using the same handle as will be used for the query, otherwise the server thinks it's a different session and it has no effect. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] EmbWeb: Moving between webapp type caveats
On Mon, 2011-06-13 at 08:56 -0700, leledumbo wrote: Back to the problem, using relative URL is not a solution as well. When I do http://localhost/proj/proj.cgi/module/action then if somewhere I put public/style/style.css then the link becomes: http://localhost/proj/proj.cgi/module/public/style/style.css, regardless of the webapp type (at least on Chrome, don't know about other browsers). Well, the webcontroller class has some functionality build-in to fix this. You can look into that. I don't know f this functionality works without a TWebPage, though. (See the webdesign package) Isn't there really a way somehow? Set it in some constant? When the webmodule still wasn't working good enough, I used defines with a constant. -- My Lazarus blog: http://www.lazarussupport.com/lazarus/weblog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] EmbWeb: Moving between webapp type caveats
Back to the problem, using relative URL is not a solution as well. When I do http://localhost/proj/proj.cgi/module/action then if somewhere I put public/style/style.css then the link becomes: http://localhost/proj/proj.cgi/module/public/style/style.css, regardless of the webapp type (at least on Chrome, don't know about other browsers). Isn't there really a way somehow? Because you need /public/style/style.css indicating that it is a static file from the virtual path starting from document root. public/style/style.css is relative from the current virtual path, which can be anything physically in the file system, depending on the OS or weather you use CGI or Apache module, etc. Also, if your CGI program opens files, it will need full physical paths, we can not use relative paths with it either, because it can be the main root dir on Linux or the Apache main dir (not the document root) on Windows. Usually not the physical path the CGI program resides in. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] EmbWeb: Moving between webapp type caveats
Set it in some constant? When the webmodule still wasn't working good enough, I used defines with a constant. I use an .ini file, but the same idea. There can be a lot of things that a web app needs as a constant. static paths, email server settings, template paths, url generation parameters (https or http, ports for development computer, etc.), db connection settings, etc. This way it is the easiest to move from a development environment to a live system. All you need is to remove the .ini file (or constants by defines), or change its values. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Setting SQL locale
Hello Lazarus-List, Monday, June 13, 2011, 8:01:44 PM, you wrote: MML I'm trying to send a SET TIMEZONE command to the server, to get DST MML correction applied to the resultset. This has to be done using the same MML handle as will be used for the query, otherwise the server thinks it's a MML different session and it has no effect. Keep warning about that! In my life I had found a lot of troubles with that, your DST setting could be applied blindly to the data and it could result in wrong times. Many code checks DST against now, get the offset and apply it to the time, which is wrong for any date/time different than now. -- Best regards, José -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Setting SQL locale
On Mon, 13 Jun 2011, Mark Morgan Lloyd wrote: When using the standard DB components connecting to e.g. a PostgreSQL backend, is there an event that fires between the connection being established and the query being issued? Normally, I'd suggest TSQLConnection.AfterConnect ? I'm trying to send a SET TIMEZONE command to the server, to get DST correction applied to the resultset. This has to be done using the same handle as will be used for the query, otherwise the server thinks it's a different session and it has no effect. Hm. I think for the Postgres engine, there is a connection per transaction. I don't think there is an event connected to the transaction. Joost will have to answer this one. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to see RTL/FCL help in editor hints
Hi all, If you want to see the RTL/FCL help in the editor hints, here is how: http://wiki.lazarus.freepascal.org/Installing_Help_in_the_IDE#fpdoc_entries_of_RTL_and_FCL Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to see RTL/FCL help in editor hints
On Mon, Jun 13, 2011 at 22:28, Mattias Gaertner nc-gaert...@netcologne.dewrote: Hi all, If you want to see the RTL/FCL help in the editor hints, here is how: http://wiki.lazarus.freepascal.org/Installing_Help_in_the_IDE#fpdoc_entries_of_RTL_and_FCL That's very helpful, thanks. How can I also use it when pressing on F1 ? Mattias Ido -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to see RTL/FCL help in editor hints
On Mon, 13 Jun 2011 22:33:57 +0300 ik ido...@gmail.com wrote: On Mon, Jun 13, 2011 at 22:28, Mattias Gaertner nc-gaert...@netcologne.dewrote: Hi all, If you want to see the RTL/FCL help in the editor hints, here is how: http://wiki.lazarus.freepascal.org/Installing_Help_in_the_IDE#fpdoc_entries_of_RTL_and_FCL That's very helpful, thanks. How can I also use it when pressing on F1 ? There are several ways. a) If you are online, then you already have it, because the IDE opens the lazarus-ccr.sourceforge.net which uses these sources. It has no search, only an index. b) You can compile them yourself and set the help path in the IDE options. Again, no search, but you can create an index. c) You can use chmhelp http://wiki.lazarus.freepascal.org/Installing_Help_in_the_IDE#Installing_Help_for_he_RTL.2C_FCL_and_LCL_in_the_Lazarus_IDE This provides an index and a search. d) As far as I know Graeme has written another help system including the fpcdocs too. This has a search too. Maybe Graeme can give a link how to set it up. And there was yet another help system, announced some weeks ago on this list. The debian packages install the chmhelp automatically. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Setting SQL locale
Michael Van Canneyt wrote: On Mon, 13 Jun 2011, Mark Morgan Lloyd wrote: When using the standard DB components connecting to e.g. a PostgreSQL backend, is there an event that fires between the connection being established and the query being issued? Normally, I'd suggest TSQLConnection.AfterConnect ? Thanks Michael, I'll investigate. I'm trying to send a SET TIMEZONE command to the server, to get DST correction applied to the resultset. This has to be done using the same handle as will be used for the query, otherwise the server thinks it's a different session and it has no effect. Hm. I think for the Postgres engine, there is a connection per transaction. I don't think there is an event connected to the transaction. Joost will have to answer this one. I think you're right, I've played a lot with this in the context of using Postgres's listen/notify facility and for some things you have to use the (long-lived) connection object's handle and for others the (short-lived) query object. In the current case I've got two query objects being used alternately in a thread, I'm hoping to be able to apply the timezone setting immediately after each is reactivated so that timestamp presentation is adjusted in the resultset. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Setting SQL locale
José Mejuto wrote: Hello Lazarus-List, Monday, June 13, 2011, 8:01:44 PM, you wrote: MML I'm trying to send a SET TIMEZONE command to the server, to get DST MML correction applied to the resultset. This has to be done using the same MML handle as will be used for the query, otherwise the server thinks it's a MML different session and it has no effect. Keep warning about that! In my life I had found a lot of troubles with that, your DST setting could be applied blindly to the data and it could result in wrong times. Many code checks DST against now, get the offset and apply it to the time, which is wrong for any date/time different than now. Thanks, but this is strictly read-only for data presentation, the underlying data is explicitly GMT which is why I'm not attempting to simply changes the database defaults. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus