Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread ik
2011/3/15 Peter Williams pewilliams2...@live.com Hi All, I use this procedure to save an inifile using the standard IniFiles unit. The problem I have is that when an .ini file already exists I cannot overwrite it. I need the TextFiles equivalent of Rewrite() for Inifiles. This line:

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread zeljko
On Tuesday 15 of March 2011 05:25:41 Peter Williams wrote: Hi All, I use this procedure to save an inifile using the standard IniFiles unit. The problem I have is that when an .ini file already exists I cannot overwrite it. I need the TextFiles equivalent of Rewrite() for Inifiles. This line:

Re: [Lazarus] Lazarus on Suse 11.4

2011-03-15 Thread Michael Schnell
On 03/14/2011 03:22 PM, Juha Manninen wrote: Should be fixed now. Can you test with the latest trunk and tell where you have problems. I just testes with the latest fpGUI from the git. gitk shows the latest commit by 2001-03-08, so the files I have do not show your changes. The error message

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Graeme Geldenhuys
Op 2011-03-14 19:14, Frank Church het geskryf: Issue 3: Is there a non GUI example that stores the data to a SQL table, and can create it as well? If you only use the core units (and some units from Options directory) located in tiOPF.lpk, then they are all non-GUI. As for the demos, I

Re: [Lazarus] Lazarus on Suse 11.4

2011-03-15 Thread Graeme Geldenhuys
Op 2011-03-15 10:47, Michael Schnell het geskryf: I just testes with the latest fpGUI from the git. gitk shows the latest commit by 2001-03-08, so the files I have do not show your changes. ^^^ I hope you meant 2011. ;-) Regards, - Graeme - -- fpGUI Toolkit - a

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Lukasz Sokol
On 15/03/2011 04:25, Peter Williams wrote: Hi All, I use this procedure to save an inifile using the standard IniFiles unit. The problem I have is that when an .ini file already exists I cannot overwrite it. I need the TextFiles equivalent of Rewrite() for Inifiles. This line: ConfigIni

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Lukasz Sokol
On 15/03/2011 08:57, Graeme Geldenhuys wrote: [...] I know nothing about SQLLite Is it free to use? ie, can I download something like a client library or server (that's if everything isn't included with FPC itself), and include it in my hourly build sever runs? I already test 5

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Sven Barth
Am 15.03.2011 09:57, schrieb Graeme Geldenhuys: If I can setup a SqlLite server or something, then I can start testing that persistence layer under tiOPF too. I'll see what I can manage. No need to setup a server. Just download the library (or install it using your distro's package manager)

[Lazarus] Commenting.

2011-03-15 Thread Kjow
Hi all! Everytime I need to comment a part of the code with (e.g. { ... } ) and I have some parts of code minimized with the -/+ on the left of editor (Please excuse me, I don't know the technical term - e.g.

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Graeme Geldenhuys
Op 2011-03-15 12:13, Sven Barth het geskryf: No need to setup a server. Just download the library (or install it using your distro's package manager) and be happy. Thanks. ... only consists of a small (~300kB) library that contains the whole DB engine. It also supports pure in-memory

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Bart
On 3/15/11, Peter Williams pewilliams2...@live.com wrote: ConfigIni := TIniFile.Create(ChangeFileExt(Application.ExeName,'.ini')); You really should not do that in most OS's, even on Windows it is deprecated since win9x. Most times you will not have write permissions there. Also under *nix this

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread michael . vancanneyt
On Tue, 15 Mar 2011, Graeme Geldenhuys wrote: Op 2011-03-15 12:13, Sven Barth het geskryf: No need to setup a server. Just download the library (or install it using your distro's package manager) and be happy. Thanks. ... only consists of a small (~300kB) library that contains the

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Graeme Geldenhuys
Op 2011-03-15 14:36, michael.vancanneyt@ het geskryf: I don't recommend it for use with pascal, since it does no type checking whatsoever - at least last time I tried - thus you can perfectly store a string in e.g. an integer field. Combined with Pascal code, this can lead to very

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Lukasz Sokol
On 15/03/2011 12:36, michael.vancann...@wisa.be wrote: On Tue, 15 Mar 2011, Graeme Geldenhuys wrote: [...] OK, so it's like Firebird Embedded DB's then. That's nice and easy. :) I don't recommend it for use with pascal, since it does no type checking whatsoever - at least last time I

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread michael . vancanneyt
On Tue, 15 Mar 2011, Graeme Geldenhuys wrote: Op 2011-03-15 14:36, michael.vancanneyt@ het geskryf: I don't recommend it for use with pascal, since it does no type checking whatsoever - at least last time I tried - thus you can perfectly store a string in e.g. an integer field.

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread michael . vancanneyt
On Tue, 15 Mar 2011, Lukasz Sokol wrote: On 15/03/2011 12:36, michael.vancann...@wisa.be wrote: On Tue, 15 Mar 2011, Graeme Geldenhuys wrote: [...] OK, so it's like Firebird Embedded DB's then. That's nice and easy. :) I don't recommend it for use with pascal, since it does no type

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread michael . vancanneyt
On Tue, 15 Mar 2011, Graeme Geldenhuys wrote: Op 2011-03-15 15:04, michael.vancanneyt@ het geskryf: SQLLite obviously. Firebird embedded is a full firebird, with all functionalies of a server. That what I thought. But you had me worried there for a second! :) By the way, that

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Sven Barth
Am 15.03.2011 14:10, schrieb Graeme Geldenhuys: Op 2011-03-15 15:04, michael.vancanneyt@ het geskryf: SQLLite obviously. Firebird embedded is a full firebird, with all functionalies of a server. That what I thought. But you had me worried there for a second! :) By the way, that

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Sven Barth
Am 15.03.2011 12:45, schrieb Bart: On 3/15/11, Peter Williamspewilliams2...@live.com wrote: ConfigIni := TIniFile.Create(ChangeFileExt(Application.ExeName,'.ini')); You really should not do that in most OS's, even on Windows it is deprecated since win9x. Most times you will not have write

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Andreas Berger
It still blows my mind why Firebird RDBMS isn't more popular, yet half-baked ones like MySQL (and from what I can read SQLLite too) is. Simple: Sloppy work is a virtue these days. I use both, so I will try to explain why I chose to use SQLite in some projects. - SQLite is faster, MUCH

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Peter Williams
Hi Bart, Date: Tue, 15 Mar 2011 12:45:49 +0100 From: bartjun...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it). On 3/15/11, Peter Williams

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Hans-Peter Diettrich
Sven Barth schrieb: It took me a while until I understand what you wanted to tell... maybe you should have mentioned directly that you mean writing in the application's directory. While I agree with you that modifyable configuration should be put into the proper configuration locations I

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Sven Barth
Am 15.03.2011 15:24, schrieb Peter Williams: Hi Bart, Date: Tue, 15 Mar 2011 12:45:49 +0100 From: bartjun...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Sven Barth
Am 15.03.2011 15:24, schrieb Peter Williams: Can someone please give me an example as to how it is called? Before I forget: The functions only return a filename, they don't create the file. So you must do that yourself (you can simply pass the result to TIniFile.Create for example).

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Peter Williams
Hi, From: pewilliams2...@live.com To: lazarus@lists.lazarus.freepascal.org Date: Wed, 16 Mar 2011 01:24:46 +1100 Subject: Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it). Hi Bart, Date: Tue, 15 Mar 2011 12:45:49 +0100

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Graeme Geldenhuys
Op 2011-03-15 15:49, Sven Barth het geskryf: While the type-safety can potentially lead to problems when non-Pascal systems access the database as well, I wouldn't describe SQLite (btw: only one L ;) ) as half-baked. It was a decision of the developers to allow this (although one might argue

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread Sven Barth
Am 15.03.2011 15:51, schrieb Peter Williams: I just tried calling Str1 := GetAppConfigDir(true); ShowMessage(Str1); and my app is called Color_Life.exe and it returns C:\ProgramData\Color_Life\. Since the folder C:\ProgramData\ exists and it's subfolder \Color_Life\ does NOT exist, then does

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Graeme Geldenhuys
Op 2011-03-15 16:05, Andreas Berger het geskryf: - SQLite is faster, MUCH faster, absolutely no comparison. Honest question. Do you actually have some speed comparisons between Firebird and other database, including SQLite? I would really like to see those please. - SQLite is easier to

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread michael . vancanneyt
On Tue, 15 Mar 2011, Andreas Berger wrote: It still blows my mind why Firebird RDBMS isn't more popular, yet half-baked ones like MySQL (and from what I can read SQLLite too) is. Simple: Sloppy work is a virtue these days. I use both, so I will try to explain why I chose to use SQLite in

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Henry Vermaak
On 15 March 2011 15:03, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Op 2011-03-15 15:49, Sven Barth het geskryf: While the type-safety can potentially lead to problems when non-Pascal systems access the database as well, I wouldn't describe SQLite (btw: only one L ;) ) as half-baked. It

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Sven Barth
Am 15.03.2011 16:15, schrieb Graeme Geldenhuys: - SQLite can be embedded without needing to distribute a DLL. (Although I no longer use this feature) ... and Firebird Embedded can share it's dll with multiple applications on that same system, reducing the byte size of each database application

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Rich Saunders
On 3/15/11 11:15 AM, Graeme Geldenhuys wrote: - Firebird embedded does not work in virtual machines when the DB is on a network mapped drive. I have tested VMWare, Virtual Box and Virtual PC. (This can also be a plus since I use this fact to inhibit one of my apps to be run from a virtual

[Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread Peter Williams
Hi Sven, Date: Tue, 15 Mar 2011 16:02:55 +0100 From: pascaldra...@googlemail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it). Am 15.03.2011 15:51, schrieb Peter

Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

2011-03-15 Thread leledumbo
Weird, I never had such a problem. In fact, one of my application uses it (the others use it implicitly via TIniPropStorage). The only problem I can think of is somehow the file is opened as well by another code and isn't closed. What if you try to debug using gdb so that you can see exactly where

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread Henry Vermaak
2011/3/15 Peter Williams pewilliams2...@live.com: Hi Sven, Date: Tue, 15 Mar 2011 16:02:55 +0100 From: pascaldra...@googlemail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread silvioprog
2011/3/15 Peter Williams pewilliams2...@live.com: (...) var  Str1 : string; begin Str1 := GetAppConfigDir(False);   if not DirectoryExists(Str1) then ForceDirectory(Str1); (...) Good luck. ;) -- Silvio Clécio = Blog - silvioprog.com.br

[Lazarus] Using BGRABitmap as TAChart back-end

2011-03-15 Thread Alexander Klenin
Since there seems to be no support for alpha-channel in LCL, I plan to implement series transparency by using BGRABitmap compoment. To avoid requiring non-core package to install TAChart, it will be added without explicit dependency, similar to the way AggPas and OpenGL backends are implemented

Re: [Lazarus] More explorations with tiOPF

2011-03-15 Thread Andreas Berger
Hi Graeme, I'm not trying to say that SQLite is better than Firebird. In fact I use FB for larger database usage. What I was trying to say is that SQLite has it's place and worth. I replied due to you thinking that SQLite was half-baked and Michael saying that it is sloppy. I'm not trying to

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread William Oliveira Ferreira
Could Try this one? http://www.freepascal.org/docs-html/rtl/sysutils/createdir.html William de Oliveira Ferreira Bacharel em Sistemas de Informação 2011/3/15 silvioprog silviop...@gmail.com 2011/3/15 Peter Williams pewilliams2...@live.com: (...) var Str1 :

[Lazarus] does anybody knows whats up with zeos?

2011-03-15 Thread Eduard Filipas
hi does anyone know whats with zeos group are they still active? maybe someone here can help me i was ask to write small program that saves data in msSQLexpress 2005 but zeos query does not return my local characters..i took problem to zeos group but i havent got reply jet...and alpha

[Lazarus] project | close project

2011-03-15 Thread Eduard Filipas
hi all i just had to change zeos komponents within lazarus 9.31 it all went fine just it was bit confusing because in menu Project | Close project doesnt just closes project it also shuts down Lazarus but then again when i restart lazarus i get the same project up again ...took me a while to

Re: [Lazarus] does anybody knows whats up with zeos?

2011-03-15 Thread Leonardo M . Ramé
On 2011-03-15 20:06:34 +0100, Eduard Filipas wrote: hi does anyone know whats with zeos group are they still active? maybe someone here can help me i was ask to write small program that saves data in msSQLexpress 2005 but zeos query does not return my local characters..i took problem to

Re: [Lazarus] does anybody knows whats up with zeos?

2011-03-15 Thread Eduard Filipas
Leonardo ...thank you very much ...it is somewhat comforting :) I guess ill just have to wait to get their reply ..again thank you. regards edo S, Leonardo M. Ramé piše: On 2011-03-15 20:06:34 +0100, Eduard Filipas wrote: hi does anyone know whats with zeos group are they still active?

[Lazarus] Stock Charting with Lazarus

2011-03-15 Thread Leonardo M . Ramé
Hi, does anyone know how can I draw an Open, High, Low, Close chart (for stock charting) with Lazarus/TChart?. An example of what I need: http://download.oracle.com/docs/html/A96127_01/img/stock_ohlc.gif Thanks in advance, -- Leonardo M. Ramé http://leonardorame.blogspot.com --

Re: [Lazarus] project | close project

2011-03-15 Thread Mattias Gaertner
On Tue, 15 Mar 2011 20:38:20 +0100 Eduard Filipas eduard.fili...@volja.net wrote: hi all i just had to change zeos komponents within lazarus 9.31 it all went fine just it was bit confusing because in menu Project | Close project doesnt just closes project it also shuts down Lazarus but then

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread silvioprog
2011/3/15 William Oliveira Ferreira bdexterholl...@gmail.com: Could Try this one? http://www.freepascal.org/docs-html/rtl/sysutils/createdir.html William de Oliveira Ferreira Bacharel em Sistemas de Informação CreateDir does not create recursive path.

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread Michael Van Canneyt
On Wed, 16 Mar 2011, Peter Williams wrote: Hi Sven, Date: Tue, 15 Mar 2011 16:02:55 +0100 From: pascaldra...@googlemail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Unable to rewrite .ini file which exists... error unable to create .ini file. (need to rewrite it).

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread silvioprog
Oops, 2011/3/15 silvioprog silviop...@gmail.com: 2011/3/15 Peter Williams pewilliams2...@live.com: (...) var   Str1 : string; begin  Str1 := GetAppConfigDir(False);   if not DirectoryExists(Str1) then // ForceDirectory(Str1);   ForceDirectories(Str1); ^^'. (...) Good luck. ;) --

Re: [Lazarus] does anybody knows whats up with zeos?

2011-03-15 Thread Terry A. Haimann
I believe you have to alter one of the libraries to get it to work with 64 bit computers. Eduard Filipas eduard.fili...@volja.net wrote: Leonardo ...thank you very much ...it is somewhat comforting :) I guess ill just have to wait to get their reply ..again thank you. regards edo S, Leonardo

Re: [Lazarus] project | close project

2011-03-15 Thread Eduard Filipas
hi im sorry..for two things.. first... it does not close amidietly first after chosing close project a window appeirs (project wizard) and closing that window with an X(at top right) closes IDE. im still bit a newbi ..how to start it in gdb mode? point me to a documentation or simply guide

[Lazarus] Method in record type, is possible?

2011-03-15 Thread silvioprog
Hi. This is possible in Lazarus/FPC?: type TFoo = record Value: string; function AsBoolean: Boolean; end; function TFoo.AsBoolean: Boolean; begin Result := StrToBoolDef(Value, False); end; In Delphi: http://edn.embarcadero.com/article/34324 or:

Re: [Lazarus] How to create a directory from a path string? (cross-platform needed).

2011-03-15 Thread William Oliveira Ferreira
Interestingly, this detail about ForceDirectory I did not know William de Oliveira Ferreira Bacharel em Sistemas de Informação 2011/3/15 silvioprog silviop...@gmail.com 2011/3/15 William Oliveira Ferreira bdexterholl...@gmail.com: Could Try this one?