Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

IniPropStorage Generates Execption Notification 11 years 8 months ago #3470

  • Terry
  • Terry's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
Hoping someone can give me some insight into a problem I am experiencing using TIniPropStorage (Misc Tab). IniPropStorage is generating a Debugger Exception Notification dialog 'EInOutError' with message: Cannot create empty directory.

I am using Code Typon V4.10 on Win7 Ultimate Lazarus for Win32(BigIDE).

The problem can be reproduced by starting a new application project, dropping a TButton, and a TIniPropStorage onto Form1. You need to set at least one Form1, SessionProperties in the Object Inspector. I set Button1.Caption in the associated editor to be captured to an ini file.
IniPropStorage1.IniFilename = 'myini.ini'
IniPropStorage1.IniSection = 'general'

The error occurs when you try to close Form1.

This has been working fine in Code Typon V4.00 and previous releases.

All help is appreciated.

I have rolled back to V4.00 and all is working well. Not sure what to do at this point. !!

Please Log in or Create an account to join the conversation.

Last edit: by Terry.

IniPropStorage Generates Execption Notification 11 years 7 months ago #3669

  • Terry
  • Terry's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
Still not sure what went wrong.

Everything was working with release 4.00 and earlier

Code Typhon 4.10 caused problems so I have waited for the next release

Code Typhon 4.20 is still problematic but I have stumbled upon a fix.

It seems IniPropStorage(x) now needs a qualified path statement. Previously setting the name of the ini file at design time allowed the read/write to the application directory. Would seem it now needs to be defined in the OnShow event of the form.

//start code snip
procedure TForm_ElixirSyrupCalc.FormShow(Sender: TObject);
var
FilePath : String;

begin
FilePath := ExtractFilePath(ParamStr(0));

//set IniPropStorage2 path
IniPropStorage2.IniFileName := FilePath + myini.ini';
...
end;
//end code snip

hope this help someone else.
I am now happily using V4.20 to continue my application development

enjoy:)

Please Log in or Create an account to join the conversation.

IniPropStorage Generates Execption Notification 11 years 7 months ago #3670

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
FPC trunk problems...
Have fun...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.
  • Page:
  • 1