Author Topic: Possible $Debug Bug? - Input$ Reading From a File Shifts Focus From IDE  (Read 3689 times)

0 Members and 1 Guest are viewing this topic.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
It makes sense that focus would shift from the IDE to my program when an Input statement is encountered, but I find that when I read from a file using Input$ the focus also shifts. Is this expected behavior for some reason?

Here is a sample clip. Simple step through the code line by line and note that the line "Temp$ = Input$(FileLength, 1)" will cause focus to shift to the console. Same thing happens when a console window is used.



   
Code: QB64: [Select]
  1. $Debug
  2.  
  3. Dim FileLength As Long
  4.  
  5. Open "QBTEST.TXT" For Output As #1
  6. Print #1, "blah, blah, blah"
  7.  
  8. Open "QBTEST.TXT" For Input As #1
  9. FileLength = LOF(1)
  10. Temp$ = Input$(FileLength, 1)
  11.  
  12. Print "Focus should still be on the IDE at this point"
  13. Print "This is the end of the test"
  14.    

FellippeHeitor

  • Guest
Re: Possible $Debug Bug? - Input$ Reading From a File Shifts Focus From IDE
« Reply #1 on: October 02, 2021, 08:01:51 pm »
Yeah, it's been hardcoded to do that because I did forget it also takes input from files, not just the keyboard. Thanks for reporting.

FellippeHeitor

  • Guest
Re: Possible $Debug Bug? - Input$ Reading From a File Shifts Focus From IDE
« Reply #2 on: October 03, 2021, 11:32:46 pm »
Fixed in tonight's development build. Let me know how it behaves on your end. ✨