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

The method "Pause()" doesn't work with sVB ... #57

Closed boa2145 closed 1 month ago

boa2145 commented 4 months ago

Hello Mohammad,

I noticed that the method "Pause()" of the object "TextWindow()" doesn't work with Small Visual Basic 2.8.9.3. I also tested it with Small Basic and the "Pause()" method works there. Do you have an explanation for this?

Regards ... Gregor

VBAndCs commented 4 months ago

Pause is called by the PauseIfVisible, and this method is added to the exe to keep it running and I wanted to force the program to close after closing the form. I can fix the Pause but I will make PauseIfVisible close the window. Can you tell me some important usage of pause? Have you ever used PauseIfVisible?


From: Gregor @.> Sent: Saturday, February 24, 2024 9:57 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] The method "Pause()" doesn't work with sVB ... (Issue #57)

Hello Mohammad,

I noticed that the method "Pause()" of the object "TextWindow()" doesn't work with Small Visual Basic 2.8.9.3. I also tested it with Small Basic and the "Pause()" method works there. Do you have an explanation for this?

Regards ... Gregor

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

boa2145 commented 4 months ago

Good evening Mohammad, I tried the Pause() and PauseIfVisible() methods on SB and sVB. For SB, both methods work for the current text window. I press a key and the source code continues and the text window stays open. However, when I try out the two functions in sVB, "Press any key to continue" also appears, but I can make visible keyboard inputs and after using the text window is closed immediately, even if the source code continues.

I only need these two methods as part of a Small Basic tutorial I'm currently working through. These two methods are explained and used there. If you ask me, I would also offer both methods in sVB since your program was set on SB. Both methods belong to SB, I would also offer them in sVB. It may lead to uncertainty among users if they try to use methods that do not work properly. And empty methods don't make sense to me. This is my opinion on this topic.

VBAndCs commented 4 months ago

Hi Gregor , I never needed these two methods, but I've fixed the pause method, bit will hide the PuaseIfVisible one, as I don't see why it is important to users. This change will be available in the next version. Thanks.


From: Gregor @.> Sent: Saturday, February 24, 2024 8:32 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The method "Pause()" doesn't work with sVB ... (Issue #57)

Good evening Mohammad, I tried the Pause() and PausIfVisible() methods on SB and sVB. For SB, both methods work for the current text window. I press a key and the source code continues and the text window stays open. However, when I try out the two functions in sVB, "Press any key to continue" also appears, but I can make visible keyboard inputs and after using the text window is closed immediately, even if the source text continues.

I only need these two methods as part of a Small Basic tutorial I'm currently working through. These two methods are explained and used there. If you ask me, I would also offer both methods in sVB since your program was set on SB. Both methods belong to SB, I would also offer them in sVB. It may lead to uncertainty among users if they try to use methods that do not work properly. And empty methods don't make sense to me. This is my opinion on this topic.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/57#issuecomment-1962724318, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVUINTBQULPU6ALCIYTYVJE4LAVCNFSM6AAAAABDX4IZFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSG4ZDIMZRHA. You are receiving this because you commented.

[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 4 months ago

Until then, I recommend you use the PauseWithoutMessage method. It acts like Pause, but doesn't show the "Press any key" method, which you can show yourself if you need to by using the TW.Write() method.


From: Gregor @.> Sent: Saturday, February 24, 2024 8:32 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The method "Pause()" doesn't work with sVB ... (Issue #57)

Good evening Mohammad, I tried the Pause() and PausIfVisible() methods on SB and sVB. For SB, both methods work for the current text window. I press a key and the source code continues and the text window stays open. However, when I try out the two functions in sVB, "Press any key to continue" also appears, but I can make visible keyboard inputs and after using the text window is closed immediately, even if the source text continues.

I only need these two methods as part of a Small Basic tutorial I'm currently working through. These two methods are explained and used there. If you ask me, I would also offer both methods in sVB since your program was set on SB. Both methods belong to SB, I would also offer them in sVB. It may lead to uncertainty among users if they try to use methods that do not work properly. And empty methods don't make sense to me. This is my opinion on this topic.

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

boa2145 commented 4 months ago

Yes, I understand, Mohammad. Thanks for the hint to use the method "PauseWithoutMessage" and to create my own message by using the method TW.Write(). Good night!

boa2145 commented 4 months ago

Good morning Mohammad, Thanks for fixing the "WriteLine.Pause()" method. Have a nice week ... Gregor

VBAndCs commented 4 months ago

Hi Gregor,

Yor're welcome.

In the next version, I will also bring back the PauseIfVisible, with a new PauseThenClose method, because I had disable the console window close button to prevent it from closing the sVB IDE in the debugging mode!

PauseThenClose (it rhymes :D) shows a slightly deferent message (Press any key to close) so it is also the perfect method to use in the exe startup instead of PauseIfVisible, so I can keep the original methods functionality as was SB.

regards.


From: Gregor @.> Sent: Monday, March 4, 2024 7:27 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The method "Pause()" doesn't work with sVB ... (Issue #57)

Good morning Mohammad, Thanks for fixing the "WriteLine.Pause()" method. Have a nice week ... Gregor

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