Jump to content


Photo

Renaming forms still has major issues


  • Please log in to reply
4 replies to this topic

#1 ielite

ielite
  • Members
  • 704 posts

Posted 24 October 2016 - 10:17 PM

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?

 


  • AlexissNag likes this

#2 DavidRM

DavidRM
  • Members
  • 56 posts
  • LocationTulsa, OK

Posted 24 October 2016 - 10:50 PM

I ran into similar issues renaming a unit. I think I eventually did it by hand.



#3 ielite

ielite
  • Members
  • 704 posts

Posted 24 October 2016 - 10:51 PM

Yes, that is eventually what I have been doing

 

I ran into similar issues renaming a unit. I think I eventually did it by hand.



#4 Laksekjønn

Laksekjønn
  • Members
  • 440 posts

Posted 25 October 2016 - 12:31 AM

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.

  • ielite likes this

#5 ielite

ielite
  • Members
  • 704 posts

Posted 25 October 2016 - 01:36 AM

Not sure I want to have to do that - when in fact, I should be able to do the steps I outlined above - thanks for pointing it out






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users