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 .

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 ,

In "Lazarus IDE" :

In "Project Options" page :
In "Application Settings" part
Title : project1 <----- "project1" is default and it seems editable .

When this field is changed , the new name is seen in the "Lazarus IDE" title .

Is it possible to add here a new field such as

Main Unit Name : Unit1 <---- "Unit1" is default and please make this also editable ?

In "Forms" page "Form1" is the default name and it is NOT editable . In this page , is it possible to include an editable field with default "Form1"
to allow users to be able to generate projects and its components with specified form names ?

During saving the project definition , Lazarus is asking a unit name with default being "unit1.pas" .
When this name is changed it is reflected into program source . Before unit name a form names is NOT asked .
After that Lazarus is asking saving the program again by supplying "project1" name as default
but not the new given name .

At present it is possible to edit ALL project related files and change all of these names , but
this is difficult and time consuming and error-prone . The ability to give these names at the beginning is more easy .

Thank you very much ,

Mehmet Erol Sanliturk

Reply by email

Mattias Gaertner
to Mehmet Erol Sanliturk
Show quoted text 18 lines
Dear Sirs , In "Lazarus IDE" : In "Project Options" page : In "Application Settings" part Title : project1 <----- "project1" is default and it seems editable . When this field is changed , the new name is seen in the "Lazarus IDE" title . Is it possible to add here a new field such as Main Unit Name : Unit1 <---- "Unit1" is default and please make this also editable ?

Please define 'main unit'.

In "Forms" page "Form1" is the default name and it is NOT editable .

Good idea. But it needs some work, because at the moment you can only rename a form when the form is open in the designer. And even this does not yet rename all references. So maybe it can be done, after the rename is improved. You can add it to the wiki wish list.

In this page , is it possible to include an editable field with default "Form1" to allow users to be able to generate projects and its components with specified form names ?

For project templates see
components/projecttemplates/README.txt

During saving the project definition , Lazarus is asking a unit name with default being "unit1.pas" . When this name is changed it is reflected into program source . Before unit name a form names is NOT asked .

Right. Saving needs a filename. A form name is not needed for saving.

After that Lazarus is asking saving the program again by supplying "project1" name as default but not the new given name .

Please create a bug report for this.

At present it is possible to edit ALL project related files and change all of these names , but this is difficult and time consuming and error-prone .

Time consuming:
IMO it is not very common to rename several you
rename all components on the form anyway. Compared to this, the naming of a form on save will not save much time. A group rename would save more time. For example renaming all childs of a groupbox.

Why error-prone?

The ability to give these names at the beginning is more easy .

pov. I personally don't think so.

Mattias

Reply by email