Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-10 Thread Mattias Gaertner
On Mon, 11 Feb 2013 00:13:00 +0100 Giuliano Colla wrote: >[...] > 3) But if also the *path* to the file doesn't yet exist, it just crashes > without rising an exception that the user application can handle somehow. I get an exception in this case: inifile:=TIniFile.Create('/does/not/exist/bla

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-10 Thread Giuliano Colla
On 02/10/2013 12:43 PM, Graeme Geldenhuys wrote: On 2013-02-09 13:56, Bart wrote: While this can easily be implemented without breaking existing code, this still does not solve the original problem. If creating the directory fails, the function does not return an errorcode, unless we decide to l

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-10 Thread Michael Van Canneyt
On Sun, 10 Feb 2013, Bart wrote: When you do something like StringList1.Strings[Index] := Value it calls TStringList.Put(). I would expect that if Value = Strings[Index] then nothing happens, and no Change or Changing are called. You expect wrong. No supposition is made whatsoever on the v

[fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-10 Thread Bart
When you do something like StringList1.Strings[Index] := Value it calls TStringList.Put(). I would expect that if Value = Strings[Index] then nothing happens, and no Change or Changing are called. Muttatis mutandis for PutObject. Procedure TStringList.Put(Index: Integer; const S: string); beg

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-10 Thread Graeme Geldenhuys
On 2013-02-09 13:56, Bart wrote: > > While this can easily be implemented without breaking existing code, > this still does not solve the original problem. > If creating the directory fails, the function does not return an > errorcode, unless we decide to let it raise an exception in this > case..