Sign in Join

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

Mailing lists / lazarus / 2014-11

"Rename identifier" issues

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Frederic Da Vitoria

Hello

I currently use Lazarus 1.2.6 / fpc 2.6.4. I have 2 issues with it

First of all, I believe the message is slightly wrong: instead of "Choose a name for the new component", it should be "Choose a new name for the component".

Here is my second issue: In a small project with only one Form, I decided at one point to rename the standard TForm1 to TMainForm and the variable Form1 to MainForm (using the F2 shortcut in both circumstances). The renaming apparently proceeded correctly and fpc compiled my application without problem. But when I ran it, I got an EResNotFound with the message "Form resource TMainForm not found (...)". I then discovered that in TMainForm.lfm still contained "object Form1: TForm1". Of course, simply renaming the component Form1 to MainForm solved the issue. In this situation, shouldn't renaming the variable with F2 also rename the component or at least suggest to do it?

Frederic Da Vitoria (davitof) Membre de l'April - ? promouvoir et d?fendre le logiciel libre ? - http://www.april.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141106/e1f89897/attachment.html>

Reply by email

Mattias Gaertner
to Frederic Da Vitoria
Show quoted text 7 lines
Hello I currently use Lazarus 1.2.6 / fpc 2.6.4. I have 2 issues with it First of all, I believe the message is slightly wrong: instead of "Choose a name for the new component", it should be "Choose a new name for the component".

This dialog is shown when creating a new component and when renaming. I changed it to "Choose a name for the component".

Show quoted text 10 lines
Here is my second issue: In a small project with only one Form, I decided at one point to rename the standard TForm1 to TMainForm and the variable Form1 to MainForm (using the F2 shortcut in both circumstances). The renaming apparently proceeded correctly and fpc compiled my application without problem. But when I ran it, I got an EResNotFound with the message "Form resource TMainForm not found (...)". I then discovered that in TMainForm.lfm still contained "object Form1: TForm1". Of course, simply renaming the component Form1 to MainForm solved the issue. In this situation, shouldn't renaming the variable with F2 also rename the component or at least suggest to do it?

Fixed in trunk.

Mattias

Reply by email

Frederic Da Vitoria
to Mattias Gaertner

2014-11-06 23:36 GMT+01:00 Mattias Gaertner :

Show quoted text 32 lines
On Thu, 6 Nov 2014 21:21:55 +0100 Frederic Da Vitoria wrote: > Hello > > I currently use Lazarus 1.2.6 / fpc 2.6.4. I have 2 issues with it > > First of all, I believe the message is slightly wrong: instead of "Choose a > name for the new component", it should be "Choose a new name for the > component". This dialog is shown when creating a new component and when renaming. I changed it to "Choose a name for the component". > Here is my second issue: In a small project with only one Form, I decided > at one point to rename the standard TForm1 to TMainForm and the variable > Form1 to MainForm (using the F2 shortcut in both circumstances). The > renaming apparently proceeded correctly and fpc compiled my application > without problem. But when I ran it, I got an EResNotFound with the message > "Form resource TMainForm not found (...)". I then discovered that in > TMainForm.lfm still contained "object Form1: TForm1". Of course, simply > renaming the component Form1 to MainForm solved the issue. In this > situation, shouldn't renaming the variable with F2 also rename the > component or at least suggest to do it? Fixed in trunk. Mattias

Great. Thanks.

Frederic Da Vitoria (davitof) Membre de l'April - ? promouvoir et d?fendre le logiciel libre ? - http://www.april.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141107/0b013d3f/attachment.html>

Reply by email