Menu

JCFSettings.cfg file issue

2006-04-24
2013-05-23
  • Nobody/Anonymous

    Hi!

    I use Jedi code formatter for delphi6. It works fine for me but it doesn't for a colleague of mine. We have the same version istalled and we have the same config file (C:\Windows\JCFSettings.cfg). The code is formatted differently on his computer. So we stated wondering where format settings come from..

    I did the following:
    I have renamed "C:\Windows\JCFSettings.cfg" to "C:\Windows\_JCFSettings.cfg". I have renamed "HKEY_CURRENT_USER\Software\Jedi" to "HKEY_CURRENT_USER\Software\_Jedi". The formatting is still correct!

    1. Where do the settings come from then??
    2. How can we fix my colleague's formatter? Any other config file or registry keys?

     
    • Anthony Steele

      Anthony Steele - 2006-04-24

      Hi

      there are a number of things going on here, all aimed at making it work smoothly.
      If a settings file name is not specified in the registry, then a default is used of the Appication directory + 'JCF2Settings.cfg'.

      If this file is not found, you should get a warning message and default values for your settings file. The settings file will be written when you exit (unless you specify not to in the registry settings).

      To change the settings file used, go to the registry settings general tab.

      Hope this helps
      Anthony

       
    • Bob Cousins

      Bob Cousins - 2006-08-30

      I think there are two problems with this:

      1. If the default cfg file is not found, you get no default values

      2. If you change settings, you get an error that the settings file is read only, in fact it doesn't exist.

      So you never get defaults, nor a cfg file, and the error persists until you load the default file explicitly.

      The root cause appears to be that the name of the default cfg file in the zipped exe is incorrect.

       
    • Bob Cousins

      Bob Cousins - 2006-08-30

      While I'm here, there is a known bug in D7 FileIsReadOnly where it returns true if the file does not exist http://qc.borland.com/wc/qcmain.aspx?d=6421. This also affects the version of FileIsReadOnly in FileUtils, although this version is not used by JCFSettings, it uses the D7 one.

       
      • Anthony Steele

        Anthony Steele - 2006-10-16

        As well as a minor filename confusion, it looks as if I have also run afoul of this issue. Stepping through the code, SysUtils.FileIsReadOnly is returning true for a file that does not exist.

        I shall have to apply the workaround of first checking if it exists.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.