Sign in Join

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

Mailing lists / lazarus / 2008-07

Changeability of Lazarus Project1 , Unit1 and Form1 names (1) .

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Mehmet Erol Sanliturk

Dear Sirs ,

Thank you very much dear Mattias for reminder of templates . I am sorry that I overlooked or forgotten the Object Inspector Favorites panel "Caption" and "Name" fields : "Form1" name may be changed there .
I remembered this point after sending my message but it was late .

When we inspect web pages or other resources about Pascal sources we see that
a lot of example projects are using these default names .

If you forgive me I will suggest that the same procedure may be called from project options panel to give or set the name . This may be not difficult or a label
may be inserted there as a reminder . The same may be performed for Unit1.pas name .

After generation of project , if it is wanted to rename these names it is necessary to
rename names in all of the project files *.lpi , *.lpr , *.lfm , *.lrs , *.pas .
Forgetting one of them requires some new corrections . A few minutes in this era
is really very valuable .

"Main unit" is the Unit1.pas of the project1 . It may be named with other words .
Mine was only a tagging about the concept .

Personally I wish that Lazarus will grow much more beautifully over time based on
its present very beautiful state .

I think also new starters of Pascal learners , especially students . For us many things
may be very easy but for the students things are not so easy .

Thank you very much ,

Mehmet Erol Sanliturk

Reply by email

Mattias Gaertner
to Mehmet Erol Sanliturk
Show quoted text 6 lines
[...] If you forgive me I will suggest that the same procedure may be called from project options panel to give or set the name . This may be not difficult or a label may be inserted there as a reminder . The same may be performed for Unit1.pas name .

The function only works if the form is open as designer form. It does not work, if for example only the pascal source is loaded. This is a todo.

Show quoted text 7 lines
After generation of project , if it is wanted to rename these names it is necessary to rename names in all of the project files *.lpi , *.lpr , *.lfm , *.lrs , *.pas . Forgetting one of them requires some new corrections . A few minutes in this era is really very valuable .

Yes.
As I said: renaming more references is a todo.

"Main unit" is the Unit1.pas of the project1 . It may be named with other words . Mine was only a tagging about the concept .

I'm not sure, what you mean with "Main unit" is the Unit1.pas of the project1. Do you mean the name "unit1.pas"? Or the first created unit? Or the first unit in the uses section of the project? Or first unit with a form? Or the unit with the main form? Or the main pascal source file that is given to the compiler as starting point? The last item is the only one, that can not change and therefore named internally the 'MainUnit'.

Show quoted text 7 lines
Personally I wish that Lazarus will grow much more beautifully over time based on its present very beautiful state . I think also new starters of Pascal learners , especially students . For us many things may be very easy but for the students things are not so easy .

True.
That's why some people suggested a 'lazarus for education' with less menu items and some extra items for newbies and students. Rainer Hamann started something. Maybe he can tell you more.

Mattias

Reply by email