gui validation

BlitzMax Forums/BlitzMax Programming/gui validation

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

brains not working, why isnt this?


SuperStrict

Global win:tgadget=CreateWindow("a window!",50,50,120,80,Null,WINDOW_TITLEBAR)
Global edit1:tgadget=CreateTextField(10,10,90,20,win)

AddHook EmitEventHook,myhook


While TextFieldText(edit1)<>"EXIT"

	PollSystem()
	Delay(100)

Wend


End


Function MyHook:Object( id:Int,data:Object,context:Object )
	Local p:Int
	
	While PollEvent()<>0

	Print CurrentEvent.tostring()
	If EventID()=EVENT_WINDOWCLOSE Then End

	If EventID()=EVENT_GADGETACTION Then
		Local s:String
		s=TextFieldText(edit1)
		s=Upper(s)
		SetGadgetText edit1,s
	EndIf

	Wend
	
	Return data

End Function