Just a quick question. I'm writing these example programs from the PureBasic Book (admittedly for PB 4)... when I F5 this code:
Code: Select all
Enumeration
#WIN_MAIN
#TEXT_INPUT
#STRING_INPUT
#BUTTON_INTERACT
#BUTTON_CLOSE
EndEnumeration
Global Quit.b = #False
#FLAGS = #PB_Window_SystemMenu | #PB_Window_ScreenCentered
If OpenWindow(#WIN_MAIN, 0, 0, 300, 200, "Inputting Text", #FLAGS)
TextGadget(#TEXT_INPUT, 10, 10, 280, 20, "Enter text here:")
StringGadget(#STRING_INPUT, 10, 30, 280, 20, "")
ButtonGadget(#BUTTON_INTERACT, 10, 170, 100, 20, "Echo Text")
ButtonGadget(#BUTTON_CLOSE, 190, 170, 100, 20, "Close")
SetActiveGadget(#STRING_INPUT)
Repeat
Event.l = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget
Case #BUTTON_INTERACT
Debug GetGadgetText(#STRING_INPUT)
Case #BUTTON_CLOSE
Quit = #True
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow Or Quit = #True
EndIf
End
; IDE Options = PureBasic 5.00 (Windows - x86)
; CursorPosition = 24
; EnableXP
; Debugger = IDE
...the little form comes up, but when I type in text in the StringGadget and click the EchoText button, it doesn't appear to be echoed anywhere. I've even selected "Debug Output" in the Debugger->Default Windows section of Preferences... nothing shows up in the Bebug Window, either (despite this from the manual: "
The debug window will automatically open at the first output is produced by your program. ... which it did ...
If you then close it, it will not automatically open on subsequent messages, however they will still be logged. You can copy this output to the clipboard or save it to a file. There is also a button to clear the messages from the window..."), nor does the Close button close the form.
I just know I'm doing something incredibly stupid... please forgive this question, but for the life of me I can figure out what it is.
