× CodeTyphon MS Windows (XP, Vista, Win7, Win8.x and Win10) OS Development, discussions and problems

Question IniPropStorage Generates Execption Notification

8 years 10 months ago - 8 years 10 months ago #3470 by Terry
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. !!
Last edit: 8 years 10 months ago by Terry.

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

8 years 8 months ago #3669 by Terry
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);
FilePath : String;

FilePath := ExtractFilePath(ParamStr(0));

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

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


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

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
8 years 8 months ago - 8 years 8 months ago #3670 by Sternas Stefanos
Replied by Sternas Stefanos on topic IniPropStorage Generates Execption Notification
Thanks Sir
FPC trunk problems...
Have fun...

PilotLogic Architect and Core Programmer
Last edit: 8 years 8 months ago by Sternas Stefanos.

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