PaulSquires / WinFBE

FreeBASIC Editor and Visual Designer for Windows
https://www.planetsquires.com
GNU General Public License v3.0
156 stars 39 forks source link

bug: bas file had been closed, open it again button click function will be Duplicated definition #38

Closed lansn closed 1 year ago

lansn commented 2 years ago

winfbe 3.0.3 1, bas file had been closed, open it again button click function will be Duplicated definition

  1. when i set the file character encoding is utf-8 bom, next time reopen the bas file, the character encoding auto set ansi

Application.Run(Form1)

'' '' Function Form1_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT form1.Text1.Text="heklo鍋让他天天" Function = 0 End Function

'' '' Function Form1_Button2_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT form1.Text1.Text="tttt2就将计就计" Function = 0 End Function'' '' Function Form1_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT Function = 0 End Function

'' '' Function Form1_Button2_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT Function = 0 End Function

PaulSquires commented 1 year ago

Thank you for the bug report. I have fixed the Form file encoding being reset to ANSI and the fix will be in version 3.0.4. When you test that version, please also confirm whether the duplicate event issue you experienced has also disappeared.

lansn commented 1 year ago

winfbe 3.0.4 1, .bas source file had been closed, open it again button click function will be Duplicated definition. the bug is not fixed yet

Function Form1_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT Function = 0 End Function

'' '' Function Form1_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT Function = 0 End Function

'' Function Form1_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT Function = 0 End Function

PaulSquires commented 1 year ago

Thanks, I had been testing for the bug in forms existing within a Project. Looks like the bug happens when you are using the visual designer outside of a Project. This should be an easy bug to fix and I will upload a new version as soon as the bug is corrected.

PaulSquires commented 1 year ago

I believe that this issue should now be fixed. Please download and try version 3.0.5. If the issue still persists for you then please let me know so that I can do further investigation. Thanks!