![]() |
Brauche Hilfe beim Warten auf Tastendruck - Printable Version +- Small Basic Forum (https://litdev.uk/mybb) +-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1) +--- Forum: Standard Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=2) +--- Thread: Brauche Hilfe beim Warten auf Tastendruck (/showthread.php?tid=296) |
Brauche Hilfe beim Warten auf Tastendruck - martmen - 04-12-2025 Hallo zusammen, ich verstehe es nicht warum es nicht funktioniert. Siehe Programm QGHP600.000. Wenn ich den Button Clock anklicke sollen der Wochentag, das Datum und die Uhrzeit angezeigt werden und auf einen Tastendruck gewartet werden. Das Programm reagiert nicht. Es scheint abzustürzen obwohl weiterhin im Textfenster die Anzeige fortlaufend angezeigt wird. Kann mir bitte jemand helfen, dass es wie gewollt funktioniert? Vielen Dank Martin RE: Brauche Hilfe beim Warten auf Tastendruck - AbsoluteBeginner - 04-12-2025 Hello. ![]() First, you need to add a pause of about 50 milliseconds to the "While" loop. I will continue to study the rest. Secondly, your "OnButtonClicked" event handling routine does a lot of work. Moreover, this subroutine calls the second subroutine, which waits for the third subroutine to execute. I believe that before you start writing PROGRAM CODE, you should create a DIAGRAM that shows the PROGRAM LOGIC. Programming is the process of CREATING the LOGIC of a future program. Writing code is just CODING. ![]() I suggest you create a diagram and start discussing it on our forum. When you see your diagram, then you can easily write the correct code. RE: Brauche Hilfe beim Warten auf Tastendruck - martmen - 04-12-2025 Hab herausgefunden, wie es funktioniert. Siehe GSHW339.000. RE: Brauche Hilfe beim Warten auf Tastendruck - AbsoluteBeginner - 04-12-2025 Great. ![]() Have you used a diagram to see your program flow through a logical chain of actions? RE: Brauche Hilfe beim Warten auf Tastendruck - martmen - 04-12-2025 Nein ich habe in TextWindow an unterschiedlichen Stellen ausgegeben. So habe ich herausgefunden, dass bestimmte Programmteile in die Hauptschleife verlegt werden müssen. Ich finde es ist eine Macke von Small Basic. Sei es drum es funktioniert nun. Schauen sie auch den Beitrag: Mach mit. |