Computer Science Canada

GUI.Problem

Author:  BioHazardousWaste [ Thu Mar 04, 2004 1:49 pm ]
Post subject:  GUI.Problem

Earlier today I was trying to build an mIRC type proggy... should be fairly simple eh? Well it is, I have finished it in VB, and it works nicely. I tried recreating it in Turing, and I got a weird error that makes no sense to me... namely:

Quote:

Deffered subroutine has not been resolved.


I have narrowed it down to these two lines
code:

UBox := GUI.CreateTextBox (635,35,150,450)
msgbox := GUI.CreateTextFieldFull (1,1,625,"",Type,0,0,GUI.INTEGER)


If I delete one, the other works, but they will not both work in the same file. Will someone please explain to me how, if it is possible for the same file {window} to contain both a text field and a text box. Thanx

*FULL CODE*
code:

import GUI

var msgbox : int
var UBox : int

procedure Type (text : string)
GUI.SetSelection (msgbox, 0, 0)
GUI.SetActive (msgbox)
end Type

UBox := GUI.CreateTextBox (635,35,150,450)
msgbox := GUI.CreateTextFieldFull (1,1,625,"",Type,0,0,GUI.INTEGER)

loop
    exit when GUI.ProcessEvent
end loop

Author:  Dan [ Thu Mar 04, 2004 6:46 pm ]
Post subject: 

if u swtich:

UBox := GUI.CreateTextBox (635,35,150,450)
msgbox := GUI.CreateTextFieldFull (1,1,625,"",Type,0,0,GUI.INTEGER)

to:

msgbox := GUI.CreateTextFieldFull (1,1,625,"",Type,0,0,GUI.INTEGER)
UBox := GUI.CreateTextBox (635,35,150,450)

it works for me, not shure why tho.

Author:  Catalyst [ Thu Mar 04, 2004 8:12 pm ]
Post subject: 

add this to the bottom of TextBoxBodyClass.tu inside the class definition

code:

        body function ConsiderKeystroke (key : char) : boolean
            result false
        end ConsiderKeystroke

That will solve the problem

Author:  BioHazardousWaste [ Fri Mar 05, 2004 3:51 pm ]
Post subject: 

Thanx catalyst... that worked

Author:  Dan [ Fri Mar 05, 2004 5:42 pm ]
Post subject: 

Catalyst wrote:
add this to the bottom of TextBoxBodyClass.tu inside the class definition

code:

        body function ConsiderKeystroke (key : char) : boolean
            result false
        end ConsiderKeystroke

That will solve the problem


ROFL, i just find this realy funny for some reason. that fact that u are fixing the progaming langue rather then the progame, realy shows u how bad turing can be.

Author:  Tony [ Fri Mar 05, 2004 6:58 pm ]
Post subject: 

well for a long while we all knew that turing's GUI module is buggy Laughing

dan - dont you remember all those times when we would tell people to modify certain functions in GUI to make them work differently? Wink

Author:  Dan [ Fri Mar 05, 2004 7:06 pm ]
Post subject: 

ya, i acualy started to work on making a good GUI verson that was fully cousmizealb with sysle sheets, but then somting happend and i stoped working on it Rolling Eyes

Author:  Tony [ Fri Mar 05, 2004 7:07 pm ]
Post subject: 

umm... what I think really happened is that it was my idea and I just never got to it Laughing

Author:  Dan [ Fri Mar 05, 2004 7:11 pm ]
Post subject: 

pff it was your idea but i did aucaly mod some of it. if i had tones of time i whould do it, it's not hard to do at all realy.


: