Author Topic: Inform editing question  (Read 7149 times)

0 Members and 1 Guest are viewing this topic.

Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Inform editing question
« on: March 15, 2021, 09:42:47 pm »
I have a beginner's question about InForm.  I am using v1.2 build 15.

I am ran InForm Designer (UiEditor.exe).  I made a simple form with some labels and buttons.  I then saved and exited to QB64.  I wrote a few lines of code to respond to events (like mouse entering a control or mouse down on a control).  I then found that I would like to add some additional controls to the form.  I again went to the InForm Designer, loaded my form and added the controls.  Here is my question: Is there a way to save the new form and use it with the code I already wrote without losing it?  I did not immediately see how this is done.  My edited form resulted in a new .bas file without the code I already wrote.  Am I missing something?  Do you have any recommendations?

Thanks!

LM

FellippeHeitor

  • Guest
Re: Inform editing question
« Reply #1 on: March 16, 2021, 08:49:11 am »
When you save an existing project, InForm will save a backup of both the .bas and the .frm files, in the same folder as the originals, with -backup added to their name. You can just rename those and continue using them.

However, in the upcoming version of InForm I've made it a bit smarter about reusing existing code when editing an existing form. If you'd like to test the new feature, enable auto-updates and choose the development channel:

 
Captura de Tela 2021-03-16 às 09.48.30.png


You should get a notification prompting you to update InForm. After you're in the latest development build, you will see that editing existing projects will be way smoother.

 
Captura de Tela 2021-03-16 às 09.47.55.png

FellippeHeitor

  • Guest
Re: Inform editing question
« Reply #2 on: March 16, 2021, 08:51:40 am »
Now, even without upgrading, if you wish to just edit the .frm file without affecting the .bas file, you can go to the Save dialog (File->Save project as) and check "Don't save .bas project (save .frm only)".

 
Captura de Tela 2021-03-16 às 09.50.08.png


If you do that, the .bas file will remain unchanged - but in this case you should manually add the DIM lines for whatever new controls you may have added.

My advice is: get the development build if editing an existing form is something you will be doing often.


Offline LM

  • Newbie
  • Posts: 28
    • View Profile
Re: Inform editing question
« Reply #3 on: March 16, 2021, 08:04:27 pm »
Thanks!  Much appreciated.  I will try it.

LM