Lazarus

Using the Lazarus IDE => General => Topic started by: russdirks on October 21, 2016, 11:22:56 pm

Title: How to preserve letter case of unit file names
Post by: russdirks on October 21, 2016, 11:22:56 pm
Running under Windows, I've noticed that the IDE forces all unit filenames to lower case.  I've tried going into Windows Explorer and renaming the files to the casing that I want, which matches the casing in code, but eventually (and I'm not sure what triggers it) the IDE will put it back to lower case.

Is there some way to stop that?
Title: Re: How to preserve letter case of unit file names
Post by: Bart on October 21, 2016, 11:54:41 pm
Check the settings in Tools->Options->Environment->Naming

Bart
Title: Re: How to preserve letter case of unit file names
Post by: russdirks on October 22, 2016, 12:05:26 am
Thanks!
Title: Re: How to preserve letter case of unit file names
Post by: marcov on November 22, 2016, 07:44:52 am
Note the reason why the IDE does this:  on case sensitive filesystems (e.g. Linux), it also checks for the file in all lowercase. Keeping files lowercase saves a lot of headaches if the code is ever used on Linux. (otherwise the case in the USES clause must match exactly)
Title: Re: How to preserve letter case of unit file names
Post by: Thaddy on November 22, 2016, 09:12:35 am
Thanks!

You should have written thanks, but no thanks, because of what Marco explained. It is a bad idea.
Title: Re: How to preserve letter case of unit file names
Post by: russdirks on November 22, 2016, 05:59:06 pm
You should have written thanks, but no thanks, because of what Marco explained. It is a bad idea.

That is your opinion, one which I do not happen to share.  For me, having my unit files in mixed case is highly desirable, whereas making sure my uses clauses match the file name case is no trouble at all.  (You do know the IDE has a search & replace feature, don't you?).  So for me, it is a good idea
Title: Re: How to preserve letter case of unit file names
Post by: Akira1364 on November 27, 2016, 12:50:00 am
Just came across this thread, felt like giving my "two cents":
As far as the IDE auto-lowercase feature is concerned, I've never cared enough either way for it to bother me or not bother me. However, I would tend to agree with "russdirks" in that there are certainly many situations where a project (especially one that consists of a high number of units and multiple developers) might benefit from a mixed-case naming scheme.

Secondly:
As much respect as I have for the Linux project as a whole, I certainly feel that the fact that it can't handle mixed-case filenames in 2016 is sheer insanity that should not be viewed by anyone as "ok" or "just how Linux is". It's just a missing feature. Nothing more. Little things like that are the reason people who are still honestly waiting for the "year of the Linux desktop" are likely to be waiting for a very, very long time.
Title: Re: How to preserve letter case of unit file names
Post by: Thaddy on July 04, 2017, 10:07:15 am
  So for me, it is a good idea.
Well, if you don't care about cross platform, plz be my guest... I don't care...
Lazarus by default tries to be cross platform. Weird casing is not an option, only on Windows.
Title: Re: How to preserve letter case of unit file names
Post by: avra on July 04, 2017, 11:20:31 am
Well, now that we have successfuly found out that IDE gives us a choice, I really don't see a point for a further debate. No additional heated explanations will make anyone to change sides, and everyone is aware of benefits and shortcommings of both options.
TinyPortal © 2005-2018