Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-04

Renaming unit

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Mace

Hi,
When I create a new unit and then save it, I save it in all lower case. I then, edit the actual unit, and rename it to the case that I would like, such as renaming from "mainunit" to "MainUnit". All is OK when I do this, but the "tab" doesn't update to the correct case until Lazarus is restarted. Could it not be updated when the actual unit is renamed? Only a minor thing, but I remember Delphi doing this so thought I'd mention it :)

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120410/fc252ead/attachment.html>

Reply by email

Mattias Gaertner
to Richard Mace
Hi, When I create a new unit and then save it, I save it in all lower case. I then, edit the actual unit, and rename it to the case that I would like, such as renaming from "mainunit" to "MainUnit".

Hint:
You can save it as 'MainUnit.pas'. The IDE then asks to save it lowercase. The file name will then be 'mainunit.pas' and the source name 'MainUnit'.

You can disable the question here:
Options / Naming / Save As - auto rename pascal files lower case

Show quoted text 5 lines
All is OK when I do this, but the "tab" doesn't update to the correct case until Lazarus is restarted. Could it not be updated when the actual unit is renamed? Only a minor thing, but I remember Delphi doing this so thought I'd mention it :)

You don't need to restart.
The tabs are updated on many events. For example when you do a "find declaration" or jump to a method body.
They are not updated on every key press in the source editor.

Mattias

Reply by email

Richard Mace
to Mattias Gaertner
Richard Mace wrote 15 lines
> Hi, > When I create a new unit and then save it, I save it in all lower case. > I then, edit the actual unit, and rename it to the case that I would like, > such as renaming from "mainunit" to "MainUnit". Hint: You can save it as 'MainUnit.pas'. The IDE then asks to save it lowercase. The file name will then be 'mainunit.pas' and the source name 'MainUnit'. You can disable the question here: Options / Naming / Save As - auto rename pascal files lower case

Thanks Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120410/907e454c/attachment-0001.html>

Reply by email

Sven Barth
to Mattias Gaertner: On Tue, 10 Apr 2012 11:00:36 +0100 Hint: You can save it as 'MainUnit.pas'. The IDE then…
Mattias Gaertner wrote 10 lines
> All is OK when I do this, > but the "tab" doesn't update to the correct case until Lazarus is > restarted. Could it not be updated when the actual unit is renamed? > Only a minor thing, but I remember Delphi doing this so thought I'd mention > it :) You don't need to restart. The tabs are updated on many events. For example when you do a "find declaration" or jump to a method body. They are not updated on every key press in the source editor.

But one could update them when saving the unit ;)

Regards,
Sven

Reply by email

Richard Mace
to Sven Barth
Sven Barth wrote 21 lines
Am 10.04.2012 12:23, schrieb Mattias Gaertner: All is OK when I do this, >> but the "tab" doesn't update to the correct case until Lazarus is >> restarted. Could it not be updated when the actual unit is renamed? >> Only a minor thing, but I remember Delphi doing this so thought I'd >> mention >> it :) >> > > You don't need to restart. > The tabs are updated on many events. For example when you do a "find > declaration" or jump to a method body. > They are not updated on every key press in the source editor. > But one could update them when saving the unit ;) Regards, Sven

Yes, that was my "hopeful" thinking Sven :)

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120410/777101bc/attachment.html>

Reply by email