• Welcome to PlanetSquires Forums.
 

WinFBE v3.0.5 (December 14, 2022)

Started by Paul Squires, December 14, 2022, 11:58:03 AM

Previous topic - Next topic

Paul Squires

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

Version 3.0.5 (December 14, 2022)
Editor:
- Fixed duplicate events when loading Form file via MRU list or drag/drop into editor from outside of a Project.
- Fixed issue whereby files added to Project via MRU list or drag/drop would not show in the Explorer list.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Thanks, Paul!
I may have stumbled upon a temporary fix for the issue I've been having with duplicate events being created in one form of a multi-form project (see previous post). On just this one form all of the Events were unchecked and the project saved. This solved the duplicating Event issue but of course, buttons and other controls had no events associated with them. Add an Event and the duplicate event issue would return.
I Closed WinFBE and then restarted WinFBE. One-by-one I rechecked the events, which created a duplicate Event; I deleted the blank duplicate Event just created and then cut the original Event (the one with the Event code still in the editor) and pasted it at the very top of the form's code at line 1. The project now compiled correctly; repeat 12 times, once for each Event, always moving the next (existing) Event to line 1 pushing the previously pasted Event down the page. These were a combination of Click, MouseDown, and MouseMove events. Controls: 3 Buttons, 2 ListViews, 1 TextBox, 1 MonthCalendar, and 2 ComboBoxes.
Adding an event to any control on this form requires a repeat of the above steps. No other form in the project and no other project displays this issue.
Win64 Console (Debug)
Clive Richey

Paul Squires

Hi Clive,

I can honestly say that I am baffled as to why this would happen with that one particular file.

Maybe you can zip up that form and design file and post it here as an attachment? I can then at least analyze the file to see if there is some sort of parsing problem that is causing WinFBE not to recognize that the events already exist.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Hi Paul,
Attached is my test-project file causing the duplicate Event issues. It is the most recent 'corrupt' file before applying the fix mentioned earlier.
The fix is working with the exception of the new Events being duplicated as mentioned earlier.
Clive Richey

Paul Squires

Thanks Clive,

I have added your files to a sample visual designer project and I am also getting the same duplicate events as you are seeing. This should be interesting trying to debug why this is happening. Programming sure is fun  ;D
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Hi Clive,

I found the source of the problem.

Looks like it is the TYPE/END TYPE at the start of the file. It causes a parsing problem whereby all functions in the file use that TYPE as its parent. Basically, the parser thinks that the functions are part of a TYPE class. This is because internally the parent element for TYPEs was not being reset between parsing of the various functions in the project.

I added three simple lines to the parser and now the functions in your file are recognized as functions, and not functions belonging to a TYPE/CLASS.

Please download and try the attached EXEs. Please let me know if it solves the duplicate events problem. If it is successful for you then I will upload a new WinFBE version.

https://www.planetsquires.com/files/Clive-WinFBE-Test.zip
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

#6
Works great, Paul, thanks for looking after that so quickly!
Everything was returned to the problem version of the forms code file which now compiles as normal. I can't seem to break it!

Not sure if this is by design or not:
Double-clicking a control opens the Editor to an Event Created based on the currently highlighted Event in the ToolBox whether or not that Event is Checked. And then Checks that Event even if the Event Tab is not open.
Clive Richey

Paul Squires

Thanks Clive for validating that the bug is now fixed.

That double-clicking on a control was implemented as a result of a feature request from users. FireFly used to do this, as well as old time Visual Basic. Double clicking on a control will open the editor and create and select that control's "default" control event, which is normally the "click" event.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

I'll just have to remember not to leave the mouse pointer in the ToolBox! ;D
Clive Richey