PlanetSquires Forums

Support Forums => WinFBE - Code Editor and Visual Designer => Topic started by: SeaVipe on October 19, 2022, 04:15:00 PM

Title: BETA 2
Post by: SeaVipe on October 19, 2022, 04:15:00 PM
Hi Paul,
Several forms in a medium-sized project can't be edited in the Design Editor (most can). BETA 1 did not display this behaviour.
The contents of the frmJedit.design file after opening the project in BETA 2:
{"form":true,"version":"3.0.2","lockcontrols":false,"snaplines":true}
Other projects open normally.
Title: Re: BETA 2
Post by: Paul Squires on October 20, 2022, 08:11:42 AM
Hi Clive, that is odd because I did not make any changes to the code that loads the .design data. In your case, the form and all controls data in the .design file has disappeared. I do not know the reason for that (yet). Maybe you just made a typo but the design file should be called "frmJedit.inc.design" (notice the extension includes the ".inc").
Title: Re: BETA 2
Post by: Paul Squires on October 20, 2022, 08:23:10 AM
It is very concerning to me that a design form would not save the form/control data. This is the first time that I have seen such a report of this. I need to watch this closely and see if I can find out why this would happen.
Title: Re: BETA 2
Post by: Paul Squires on October 20, 2022, 10:08:42 AM
Here is the sequence of events that should happen:

(1) Projects or Forms created prior to version 3.02 have their version number checked against 3.02. If it is lower then it is subject to a form upgrade/conversion in 3.02. However, only code files that contain visual designer information are upgraded. Any other "normal" type of code file is simply bypassed.

(2) In pre-version 3.02, visual designer information was stored in the same disk file as the code for that file. In 3.02 and after, that visual designer information is extracted from the code file and stored in a separate disk file with the ".design" extension appended to the file name. So, if your file is called frmMain.bas then the design file would be frmMain.bas.design. Similarly, if your file was called frmJedit.inc then the visual designer file would be called frmJedit.inc.design.

(3) The *.design files format is a simple JSON format.

(4) When WinFBE loads a file (or many files from a Project), it loads the code file and then does a simple check to see if an associated *.design file exists for that code file. If it does, then it loads that file as a visual designer object and will display the form and controls in WinFBE.

(5) When WinFBE saves files, it will save both the code file and design files into their specific files.

I am trying to understand how in your case a visual design file would be empty. I need to experiment with opening the files in 3.02 WinFBE but then re-opening the files in an older version of WinFBE and then re-opening them once again in 3.02. I wonder if that makes any difference whatsoever because I could see a scenario where someone may do such a thing.

Title: Re: BETA 2
Post by: SeaVipe on October 20, 2022, 01:37:09 PM
Quote from: Paul Squires on October 20, 2022, 08:11:42 AMHi Clive, that is odd because I did not make any changes to the code that loads the .design data. In your case, the form and all controls data in the .design file has disappeared. I do not know the reason for that (yet). Maybe you just made a typo but the design file should be called "frmJedit.inc.design" (notice the extension includes the ".inc").
Hi Paul, Yes, a typo in the post. the disk file is properly named frmJedit.inc.design.