Recent

Author Topic: Toggle Form/Unit View by pressing F12  (Read 269 times)

Aruna

  • Sr. Member
  • ****
  • Posts: 456
Toggle Form/Unit View by pressing F12
« on: September 19, 2024, 11:46:30 pm »
I made some changes directly to the unit1.lfm file on disk. After this the IDE warned me the file on disk has changes. Screenshot attached. I reloaded the file. On asking it to compile and run, success. Great. But when I press F12 to bring the Form back into view so I can make changes it no longer displays the form but shows me the unit source. How do I get the form to show up again? 
Debian GNU/Linux 11 (bullseye)
https://pascal.chat/

wp

  • Hero Member
  • *****
  • Posts: 12353
Re: Toggle Form/Unit View by pressing F12
« Reply #1 on: September 20, 2024, 12:28:48 am »
I made some changes directly to the unit1.lfm file on disk.
Unless you exactly know what you are doing, do not edit the lfm file yourself. From you screenshot, I guess that you added a menu item in the lfm file, but forgot to add the new TMenuItem variable to the pas file. You have the menu editor to add/delete menu items.

Aruna

  • Sr. Member
  • ****
  • Posts: 456
Re: Toggle Form/Unit View by pressing F12
« Reply #2 on: September 20, 2024, 02:21:42 am »
I made some changes directly to the unit1.lfm file on disk.
Unless you exactly know what you are doing, do not edit the lfm file yourself. From you screenshot, I guess that you added a menu item in the lfm file, but forgot to add the new TMenuItem variable to the pas file. You have the menu editor to add/delete menu items.
Yes, I added a couple of menu items. I found the object inspector routine of click your Menuitem, scroll to where the name property is then type it in, then repeat as necessary a rather tedious process after a while. So decided to directly enter stuff into the unit1.lfm.  But that was a mistake, hard lesson learnt :-)

No fix or workaround I suppose? Attached screenshot shows there is NO designer-Form1 (So where did it go?)
« Last Edit: September 20, 2024, 02:46:57 am by Aruna »
Debian GNU/Linux 11 (bullseye)
https://pascal.chat/

 

TinyPortal © 2005-2018