Jump to content
IElite

Renaming forms still has major issues

Recommended Posts

SMS version 2.2.2.4543
 
IDE Test 1
 
1.) Start a new project - 'Visual Components Project'


2.) Save project as 'IDETest1'


3.) Click on the actual Form - Form1 in the project. 


4.) In the object Inspector pane, change the name property to 'Main' 


NOTE: The class name in Unit Form1 does not change! It stays as TForm1 - not TfrmMain
How do you rename TForm1 class throughout the unit, without having to do a search and replace, then 
Also, the Form1 name under forms in the Project manager also did not change.
 
IDE Test 2
 
 
1.) Start a new project - 'Visual Components Project'


2.) Save project as 'IDETest2'


3.) Click on Form1 under Forms in the Project Manager.. 


4.) Right click and choose rename. Rename to 'Main'


NOTE: The unit name changed, but the forms class did not, and the name property in the object inspector did not
 
 
Addional form Test
 
 
1.) Add a New form to the project


2.) Save form as Splash, save project


3.) Click on Form. In object Inspector, the name in the Object Inspector pane is 'Splash'


4.) Switch to code view and the form's class is also called TSplash and not TForm1
 
 
IDE Test 3
 
1.) Start a new project - 'Visual Components Project'


2.) Save project as 'IDETest3'


3.) Click on the actual physical form in design view. 


4.) In the Object Inspector, change the form's name 'Form1'  to 'Main';


5.) Nothing changes! Not the form class and not the name in the project manager


6.) In the project manager, right click and rename form1 to Main


7.) Still Nothing


8.) Add a new form  save as Form1


9.) Select the form in design view and change its name to 'Test' in the object inspector


NOTE: You should receive an access violation

 

What steps do you take to rename the default form as well as add new forms and rename them?

 

Share this post


Link to post
Share on other sites

1.) Start a new project - 'Visual Components Project'


2.) Save project as 'IDETest1'


3.) Click on the actual Form - Form1 in the project, press F12 to switch Form-to-code


4.) In the source code, select Form1 

 

 

unit Form1;

 go to menu Refactor --> Rename --> New Symbol name: Main

 

Now we have the Main.pas.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×