Not sure what your trying to do, but this makes a button work?
But The second function would never execute due to the "END" command.
AND I dont know what the $803 if for? etc.
I would try starting with one of the Examples, there should be an example of a PUSH BUTTON and how to handle the EVENTs included in your BMAX.
main=CreateWindow("MAIN",300,300,400,500,main,15)
Global button:TGadget=CreateButton("Hello",200,200,100,100,main,1)
list=CreateListBox(100,200,200,200,main)
AddGadgetItem List,"TIME"
AddGadgetItem List,"PLACE"
'';Functions
Function Apocalypse()
While WaitEvent()
If EventSource()=button Then
Notify("Its the Apocalypse!")
EndIf
Wend
End Function
Function Start()
While WaitEvent()
Print EventID()
If EventSource()=button
Notify("Hope it worked!")
EndIf
Wend
End Function
Apocalypse()
Start()
End
But The second function would never execute due to the "END" command.
AND I dont know what the $803 if for? etc.
I would try starting with one of the Examples, there should be an example of a PUSH BUTTON and how to handle the EVENTs included in your BMAX.
main=CreateWindow("MAIN",300,300,400,500,main,15)
Global button:TGadget=CreateButton("Hello",200,200,100,100,main,1)
list=CreateListBox(100,200,200,200,main)
AddGadgetItem List,"TIME"
AddGadgetItem List,"PLACE"
'';Functions
Function Apocalypse()
While WaitEvent()
If EventSource()=button Then
Notify("Its the Apocalypse!")
EndIf
Wend
End Function
Function Start()
While WaitEvent()
Print EventID()
If EventSource()=button
Notify("Hope it worked!")
EndIf
Wend
End Function
Apocalypse()
Start()
End