VBAndCs / sVB-Small-Visual-Basic

Small Visual Basic (sVB) is an educational programming language, created by Eng. Mohammad Hamdy as an evolved version of Microsoft Small Basic (SB). It is meant to be easier and more powerful at the same time, to introduce programming basics to kids and beginners of any age, provided that they can use the English keyboard on the Windows OS.
Other
222 stars 16 forks source link

ArgumentException booms in Form_OnShow #63

Closed dynamicboy closed 1 month ago

dynamicboy commented 1 month ago

Version: 3.0.5 Details: Every function in the Form_OnShown event seems to throw an ArgumentException error. Screenshot: image

dynamicboy commented 1 month ago

Clicking the "Debug" button again causes Small Visual Basic to exit immediately.

VBAndCs commented 1 month ago

Hi, dynamicboy Thanks for reporting this bug. I fixed the bug and I will publish it in a few hours. I also made some changes while reviewing the OnShown event, to make it behave exactly the same in run and debug modes. Further more, I changed the form generated code (in the form.sb.gen file) to call the Form.Show method after adding the OnShown handler. It is strange that this event was working in first place, but invoking code asynchronously made it possible but with some unexpected behavior, but with the new fix things will work as expected. Still, the global code runs in parallel with the OnShown Event, so the they must be independent, otherwise the whole code must be writing in one place: either in the global section or in the OnShow handler.

Clicking the "Debug" button again causes Small Visual Basic to exit immediately.

If you mean ending the running program, this is by design, as you can't continue running the program with an error. But if you mean that the sVB IDE itself is closed, this is a bug and should be fixed.


From: dynamicboy @.> Sent: Wednesday, May 22, 2024 8:51 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] ArgumentException booms in Form_OnShow (Issue #63)

Clicking the "Debug" button again causes Small Visual Basic to exit immediately.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/63#issuecomment-2125723196, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVVLMIJSXVJNVSA5EPTZDUANNAVCNFSM6AAAAABIELHLMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVG4ZDGMJZGY. You are receiving this because you are subscribed to this thread.

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.comhttps://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

VBAndCs commented 1 month ago

I just published sVB 3.0.6 with the fix for the two bugs (actually they are the same bug). I also reviewed the OnClosed and OnClosing events and made some changes so that they work as expected with the Nothing keyword and can have only one handler per library. I also discovered a bug in the TextBox.OnSelection event that resulted from a copy and paste from another event! The issue is that I didn't have the time to test all events, and some of them are rarely used, so I appreciate such bug reporst. Thanks.


From: dynamicboy @.> Sent: Wednesday, May 22, 2024 8:51 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] ArgumentException booms in Form_OnShow (Issue #63)

Clicking the "Debug" button again causes Small Visual Basic to exit immediately.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/63#issuecomment-2125723196, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVVLMIJSXVJNVSA5EPTZDUANNAVCNFSM6AAAAABIELHLMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVG4ZDGMJZGY. You are receiving this because you are subscribed to this thread.Message ID: @.***>