• Welcome to PlanetSquires Forums.
 

WinFBE v3.0.2 (BETA-5) (November 6, 2022)

Started by Paul Squires, November 06, 2022, 04:56:25 PM

Previous topic - Next topic

Paul Squires

This will hopefully be the last Beta before the release of v3.0.2

Download from:  https://github.com/PaulSquires/WinFBE/releases

Version 3.0.2 (beta 5)
Editor:
- Fixed bug where WinFBE 64-bit only would GPF if currently loaded file is edited by an external editor causing WinFBE to reload the file.
- Fixed bug where focus would be lost from the Find textbox as the user typed a search word and a corresponding match was found.
- Fixed bug where an invalid startup position for the editor would be saved if WinFBE closed while it is minimized to the Windows Taskbar.
- Added new internal code parser that creates codetips and autocomplete popups.
- Fixed GPF for WinFBE 64-bit that was caused by some leftover array code from cache system that was removed from earlier BETA.
- In-memory parser database not cleared when the same Project loaded multiple times resulting in duplicate entries in the Functions list.

Visual Designer:
- MAJOR FILE FORMAT CHANGE: Form data separated from code file and is now saved to external file with *.design file extension.
- Existing visual designer files are saved with a "*.backup-before-upgrade" file extension prior to the new file format upgrade in case something goes wrong and the user needs revert to the older file.
- When selecting a control from the toolbox and then just clicking on a form (not "drawing" it), it creates a control with a height and width of 0. There are now default sizes for all controls that may be created too small.
- When double-clicking an event in the toolbox, automatically enable that event, create the placeholder (if needed) and switch to that event in the code view.
- When double-clicking a control in design view, automatically switch to the code view for the default event handler for that control (e.g.: the _Click handler if it's a button).
- Listview was not clearing columns/rows when a form is reused (e.g. via popup form).
- Added Listview property (HeaderThemed) to enable/disable theme drawing for the header portion of the Listview.
- The ability to set the default control font name and size for all new controls created for a project, rather than always defaulting to Segoe UI 9pt.
- Added Button control property (AllowFocusRect) to enable/disable drawing the rectangle around the button when it has focus. Only valid if Theme property is False.
- Added Button control property (TextForeColorHot) to set text color when mouse hovers over the button. Only valid if Theme property is False.
- Added Control property (Anchor) which allows you to specify layout resize/movement at design time (uses the WinFBX CLayout class behind the scenes).
- Added Anchor property for Forms.
- Added ChildFormParent property for Forms.
- Added check to prevent duplicate code output into the resource file for images with the same path and filename as this would cause a compile error.
- Added code to ensure that when saving Form data it is output to the JSON design file prior to any Controls on the form, otherwise a GPF may occur when loading.
- Added code that will update or add to existing SELECT CASE event structures in generated code for MENUS, STATUSBARS, and TOOLBARS.
- Added TextBox and RichEdit control property (MaxLength).
- Fixed display of Frame control text background color in both the visual designer and code generation.
- Added Button control property (MultiLine).
- Replaced existing fbJSON parser with the cJSON "C" based parser (32 and 64 bit DLL's).

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

*** BETA 1 to BETA 4 include a bug in the JSON output form any Form and/or Controls that have EVENTs selected. An extra "," comma was output immediately after the EVENT name. This is not correct JSON and I have since corrected the problem but attempting to load those Design files into WinFBE will result in a blank screen displaying.

You have to manually edit your form design disk files to remove the extra commas next to each of your EVENTs. It is not hard to do, but it could be tedious. This is a one time thing so I am not adding code to WinFBE to automate this. If you run into trouble then you can email me your design file (or post it here on the forum) and I will edit it for you. Nothing is lost in your design file, it just will not load because of the extra "," commas.

Please see this helpful advice from Joerg:
https://www.planetsquires.com/protect/forum/index.php?msg=35647
QuoteHello Together

The described "problem" with the .design files could be solved quite easily via the page "https://jsoneditoronline.org/".
I uploaded the corresponding files to the site, selected the tree view, repaired the file and then had it saved back.
Before that, of course, I made a backup.
At least for me, I was able to read and compile the files in the current version via Github without errors.

Maybe this helps one or the other of you.

It's worth a try before you drown all Paul with a conversion.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Thank you, Paul!

Once I got the .design 'transformed' everything except StatusBar worked. Thanks to Joerg for the link to the JSON EDITOR Online - easy peasy lemon squeezy.

StatusBar didn't convert well; the WIDTH and MINWITH values were all blank in the editor so the project wouldn't compile. Just a simple case of editing the StatusBar for each form and inserting the correct values (from backup).

MultiLine button works great. To centre virtically just add LineFeed Text prefixes.
.Text = LF & LF & "Line 1" & LF & "Line 2"
Clive Richey

Joerg B.

Hello Paul
Are there still problems with the new json format?

On a very old project from the early days that I sometimes unpack to test new versions, I get the following errors:

WINFBE_VD_MAIN.bas(70) error 99: No matching overloaded function, MINWIDTH()
WINFBE_VD_MAIN.bas(81) error 99: No matching overloaded function, WIDTH()
WINFBE_VD_MAIN.bas(82) error 99: No matching overloaded function, MINWIDTH()
WINFBE_VD_MAIN.bas(93) error 99: No matching overloaded function, WIDTH()
WINFBE_VD_MAIN.bas(94) error 99: No matching overloaded function, MINWIDTH()
WINFBE_VD_MAIN.bas(105) error 99: No matching overloaded function, WIDTH()
WINFBE_VD_MAIN.bas(106) error 99: No matching overloaded function, MINWIDTH()


Interesting for me is also that the WINFBE_VD_MAIN.bas in the directory does not exist (anymore).

With the "old" json format these hints are not output and the code is compiled.
Likewise with the "customized" json file that was corrected via the website and the previous version before Beta 5.
Greeting from Germany

Joerg

Paul Squires

Hi Joerg, yes that error was reported by Clive a few days ago. I thought that I had fixed it in beta 5. It is related to the statusbar import.

That old project... was it one that had already been converted via an earlier beta, or was it an original project from the older WinFBE program prior to it ever being imported by the early betas?

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

#5
Hi Paul,
Opened a backed-up project in Beta 5 for the first time,  Transformed .Design files in JSON EDITOR Online then reopened the Project and modified the Width and Minwidth values for all StatusBasr Panels as per an earlier post.In Designer, all Text for Button controls are set to "Button1" while ToolBox displays user-entered text. Changing user-entered text has no effect; the Designer Button continues to display "Button1" while the ToolBox displays User text. (The Text will display correctly on the compiled form should the Button's Text be modified programmatically.) Toggling between MultiLine = True/False will solve the issue in the Designer but it has to be done for each Button control on every form. Incidentally, Toggling MultiLine does not force the TextAlign value as it did previously; something to do with transforming using the JSON Editor?

UPDATE November 12, 2022:
Turned on my development machine this morning and all of the above has been undone; all Buttons are back to "Button1" and the one form that had a MultiLine Button will not display in Designer. I had to Transform frmMain.inc.Design file in JSON EDITOR Online a second time. Opening the project, again, all the buttons displayed "Button1". This time only 1 button was edited and nothing else. The MultiLine (already set to False) was toggled between False and True. TextAliegn did not change but the User Text now displayed correctly - not "Button1". Form saved then WinFBE closed. Restarted WinFBE and frmMain no longer displays in Designer. The only change was one button MultiLine from False to True and back to False. The same issue when one button MultiLine changed from False to True (and not back to False). Form not displayed in WinFBE when restarted. The multiLine value does, however, survive the JSON EDITOR Online Transformation each time.
StatusBar WIDTH and MINWIDTH do not survive JSON EDITOR transformation and must be manually set in Designer.
Clive Richey

SeaVipe

Hi Paul,

Without doing an exhaustive study, I've noticed a few functions not displaying Auto Complete - most noticeably colors.
Clive Richey

Paul Squires

Thanks for the reports guys.

I am now working through the issues and will post as I fix them.

I have fixed the StatusBar Width and MinWidth issue. I was saving the values to the JSON file as a number instead of a double quoted string number. For example, a Width of 100 was being saved to the file as 100 instead of "100" which is what the JSON reader expected.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Hi Clive,

I fixed the Button problem with not displaying the TEXT property correctly.

I will compile new EXE's and post here so that you can test the changes.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Here is a link to a ZIP fiel download with the newly compiled 32-bit and 64-bit EXE's.

Hopefully the StatusBar (Width/MinWidth) and Button (Text) issues are now fixed.


https://www.planetsquires.com/files/clive_test_winfbe_exes.zip

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Joerg B.

#10
Hey Paul

Sorry for the late feedback. I can confirm the descriptions of SeaVipe.

To your questions..... I have upgraded from version 2.x to version 3.01. And from version 3.01 to version 3.02.
But I could also go directly from version 2.x to version 3.02. The behavior is the same.
I "converted" the corresponding .json from version 3.01 to 3.02 with the online editor.
Both forms were displayed in the version. When compiling, due to the errors (with and minwith) were aborted and the .json file containing the status bar was corrupted.
The good news is that with the two new exe files, the .design file (which contains a status bar), is no longer corrupted.
The WINFBE_VD_MAIN.bas is now/stays in the directory as well.

But the compile process is still aborted with the known errors.

If I remove the status bar, then the compilation runs through everything without errors.

function frmMainType.FormInitializeComponent( byval pForm as frmMainType ptr ) as LRESULT
  dim as long nClientOffset
  pForm->SetInitialCtrlID(10000 )

  dim as long idxPanel
  pForm->StatusBar.Panels.Clear
  pForm->StatusBar.Parent = pForm
  pForm->StatusBar.SizingGrip = false
  idxPanel = pForm->StatusBar.Panels.Add
  pForm->StatusBar.Panel(idxPanel).Text = ""
  pForm->StatusBar.Panel(idxPanel).Icon = ""
  pForm->StatusBar.Panel(idxPanel).ToolTip = ""
  pForm->StatusBar.Panel(idxPanel).Width =
'error \WINFBE_VD_MAIN.bas(69) error 99: No matching overloaded function, WIDTH()
  pForm->StatusBar.Panel(idxPanel).MinWidth =
'error \WINFBE_VD_MAIN.bas(70) error 99: No matching overloaded function, MINWIDTH()
  pForm->StatusBar.Panel(idxPanel).Alignment = StatusBarPanelAlignment.Left
  pForm->StatusBar.Panel(idxPanel).AutoSize = StatusBarPanelAutoSize.None
  pForm->StatusBar.Panel(idxPanel).BackColor = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).BackColorHot = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).ForeColor = Colors.SystemControlText
  pForm->StatusBar.Panel(idxPanel).ForeColorHot = Colors.SystemControlText
  idxPanel = pForm->StatusBar.Panels.Add
  pForm->StatusBar.Panel(idxPanel).Text = ""
  pForm->StatusBar.Panel(idxPanel).Icon = ""
  pForm->StatusBar.Panel(idxPanel).ToolTip = ""
  pForm->StatusBar.Panel(idxPanel).Width =
'error \WINFBE_VD_MAIN.bas(81) error 99: No matching overloaded function, WIDTH()
  pForm->StatusBar.Panel(idxPanel).MinWidth =
'error \WINFBE_VD_MAIN.bas(82) error 99: No matching overloaded function, MINWIDTH()
  pForm->StatusBar.Panel(idxPanel).Alignment = StatusBarPanelAlignment.Left
  pForm->StatusBar.Panel(idxPanel).AutoSize = StatusBarPanelAutoSize.None
  pForm->StatusBar.Panel(idxPanel).BackColor = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).BackColorHot = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).ForeColor = Colors.SystemControlText
  pForm->StatusBar.Panel(idxPanel).ForeColorHot = Colors.SystemControlText
  idxPanel = pForm->StatusBar.Panels.Add
  pForm->StatusBar.Panel(idxPanel).Text = ""
  pForm->StatusBar.Panel(idxPanel).Icon = ""
  pForm->StatusBar.Panel(idxPanel).ToolTip = ""
  pForm->StatusBar.Panel(idxPanel).Width =
'error \WINFBE_VD_MAIN.bas(93) error 99: No matching overloaded function, WIDTH()
  pForm->StatusBar.Panel(idxPanel).MinWidth =
'error \WINFBE_VD_MAIN.bas(94) error 99: No matching overloaded function, MINWIDTH()
  pForm->StatusBar.Panel(idxPanel).Alignment = StatusBarPanelAlignment.Left
  pForm->StatusBar.Panel(idxPanel).AutoSize = StatusBarPanelAutoSize.None
  pForm->StatusBar.Panel(idxPanel).BackColor = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).BackColorHot = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).ForeColor = Colors.SystemControlText
  pForm->StatusBar.Panel(idxPanel).ForeColorHot = Colors.SystemControlText
  idxPanel = pForm->StatusBar.Panels.Add
  pForm->StatusBar.Panel(idxPanel).Text = ""
  pForm->StatusBar.Panel(idxPanel).Icon = ""
  pForm->StatusBar.Panel(idxPanel).ToolTip = ""
  pForm->StatusBar.Panel(idxPanel).Width =
'error \WINFBE_VD_MAIN.bas(105) error 99: No matching overloaded function, WIDTH()
  pForm->StatusBar.Panel(idxPanel).MinWidth =
'error \WINFBE_VD_MAIN.bas(106) error 99: No matching overloaded function, MINWIDTH()
  pForm->StatusBar.Panel(idxPanel).Alignment = StatusBarPanelAlignment.Left
  pForm->StatusBar.Panel(idxPanel).AutoSize = StatusBarPanelAutoSize.None
  pForm->StatusBar.Panel(idxPanel).BackColor = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).BackColorHot = Colors.SystemControl
  pForm->StatusBar.Panel(idxPanel).ForeColor = Colors.SystemControlText
  pForm->StatusBar.Panel(idxPanel).ForeColorHot = Colors.SystemControlText
  pForm->StatusBar.OnClick = @frmMain_StatusBar_Click
  pForm->Controls.Add(controltype.StatusBar, @(pForm->StatusBar))
Greeting from Germany

Joerg

SeaVipe

Quote from: Paul Squires on November 14, 2022, 09:09:12 AMHopefully the StatusBar (Width/MinWidth) and Button (Text) issues are now fixed.
Thanks, Paul,
So far so good.
When adding a new StatusBar control, the "Display on form" defaults to unchecked.

In the just-curious-department:
Function frmMain_Click()
    frmRecPays.ShowDialog( frmMain.hWindow )   ' Displays as Modal
    frmRecPays.ShowDialog( sender.hWindow )   ' Displays as Modeless
End Function
Clive Richey