Computer Science Canada

buttons dont work

Author:  jrok311 [ Sat Apr 30, 2005 1:52 pm ]
Post subject:  buttons dont work

I'm working on a program that uses buttons. I have made many of them before but have never had any problems with it. In this program the buttons cannot be clicked. How can I fix it? Here is my code:

code:

import GUI in "%oot/support/lib/GUI"
setscreen ("graphics")

const chatPort : int := 5055
var netStream : int
var netAddress : string

procedure runserver
    netStream := Net.WaitForConnection (chatPort, netAddress)
end runserver

procedure connecttoserver
    put "Enter the address to connect to: " ..
    get netAddress
    netStream := Net.OpenConnection (netAddress, chatPort)
    if netStream <= 0 then
        put "Unable to connect to ", netAddress
    end if
end connecttoserver

procedure main
    var server : int := GUI.CreateButton (282, 260, 135, "run chat server", runserver)
    var connect : int := GUI.CreateButton (252, 160, 35, "connect", connecttoserver)
end main
main

Author:  Bacchus [ Sat Apr 30, 2005 3:55 pm ]
Post subject: 

forgot the GUI.ProcessEvent

Author:  jrok311 [ Sat Apr 30, 2005 4:18 pm ]
Post subject:  thanks

o ya, how could i have missed that? Confused thanks


: