| Hi all, 
 Just got MaxGUI, and I'm following the tutorials at 2DGamers and trying my hand at GUI coding! I am having a strange problem, though - I have two buttons, both of which are supposed to change text when clicked, but only one of them - the second one declared, always - works. Here's my code:
 
 
  
SuperStrict 
Global style:Int = WINDOW_TITLEBAR|WINDOW_RESIZABLE|WINDOW_MENU|WINDOW_STATUS
Global clickedFirst:Int = 0 
Global myWindow:TGadget=createwindow("MyWindow",500,500,800,600,Null,style)
Global secondButton:TGadget=createbutton("No, click ME!",150,200,400,400,myWindow)
Global firstButton:TGadget=createbutton("Click ME!",150,150,400,400,myWindow)
Repeat
WaitEvent()
	setstatustext myWindow, "MyWindow Created Successfully... Size (width/height): " + clientwidth(myWindow)+ ", "+clientheight(myWindow)+ ". Style: "+style 
	Select EventID() 
		Case EVENT_WINDOWCLOSE
			End 
		Case EVENT_GADGETACTION
			Select EventSource()
				Case secondButton
					setgadgettext(secondButton,"You clicked ME!") 
				Case firstButton
					setgadgettext(firstButton,"You clicked on ME!") 
			End Select 
		End Select 
Forever 
End 
 Any idea why? I get no warnings or errors when I compile.
 
 
 |