Computer Science Canada

Stumped on GUI

Author:  GhostCobra [ Fri Jan 13, 2006 8:18 pm ]
Post subject:  Stumped on GUI

Well, here's my code.

code:

import GUI

proc null (text : string)
end null

proc null2
end null2

proc LoadFile
    var font1 : int := Font.New ("arial:12:bold")
    var font2 : int := Font.New ("arial:12")
    var openMP3Button, openMP3FileBox, openMP3List, openMP3Window : int
   
    openMP3Window := Window.Open ("graphics:400;300,title:MP3 File Selection")
    openMP3List := GUI.CreateTextBox (10, 50, 380, 240)
    openMP3FileBox := GUI.CreateTextFieldFull (65, 10, 260, "", null, GUI.INDENT, font2, 0)
    openMP3Button := GUI.CreateButton (330, 8, 20, "Open", null2)
    Font.Draw ("File(s):", 10, 13, font1, black)

    loop
        exit when GUI.ProcessEvent
    end loop
end LoadFile

LoadFile


It doesn't give a clear error. I've tried setting the text box active. I don't want to invest anymore time in it, as I've messed with GUI before and this is just making me angry.

Author:  person [ Fri Jan 13, 2006 9:08 pm ]
Post subject: 

code:

import GUI

proc null (text : string)
end null

proc null2
end null2

proc LoadFile
    var font1 : int := Font.New ("arial:12:bold")
    var font2 : int := Font.New ("arial:12")
    var openMP3Button, openMP3FileBox, openMP3List, openMP3Window : int

    openMP3Window := Window.Open ("graphics:400;300,title:MP3 File Selection")
    openMP3FileBox := GUI.CreateTextFieldFull (65, 10, 260, "", null, GUI.INDENT, font2, 0)
    openMP3List := GUI.CreateTextBox (10, 50, 380, 240)
    openMP3Button := GUI.CreateButton (330, 8, 20, "Open", null2)
    Font.Draw ("File(s):", 10, 13, font1, black)

    loop
        exit when GUI.ProcessEvent
    end loop
end LoadFile

LoadFile


btw: dont use capital letters for procedures, save them for classes

Author:  GhostCobra [ Mon Jan 16, 2006 12:27 am ]
Post subject: 

You'd think it wouldn't matter what order it was Neutral, considering I've used it so many times.


: