Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 gui.creatextfield help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic
Author Message
shanestillwell




PostPosted: Thu Jan 13, 2011 1:46 pm   Post subject: gui.creatextfield help

What is it you are trying to achieve?
trying to create a text field for my conversion machine, can't get it to run.


What is the problem you are having?
lots of errors and no idea why, i used identical code to the turing help index.


Turing:


import GUI

View.Set ("graphics:639;299,nobuttonbar")
var measurement1field, measurement2field : int
var amountfield :int

procedure measurement1recieved(text : string)
    GUI.SetSelection (amountfield, 0, 0)
    GUI.SetActive (amountfield)
end measurement1recieved

procedure amountrecieved(text : string)
    GUI.SetSelection (measurement2field, 0,0)
    GUI.SetActive (measurement2field)
end amountrecieved



GUI.SetBackgroundColour (gray)
var enterbutton:=GUI.CreateButton (320,200,50,"Convert",GUI.Quit)
measurement1field:= GUI.CreateTextFieldFull(320,300,50,"from",measurement1recieved,0,0)
amountfield:= GUI.CreateTextFieldFull(320,200,50,"amount",amountrecieved,0,0)
measurement2field:= GUI.CreateTextFieldFull(320,250,50,"to",measurement2recieved,font2,0,0)
loop
    exit when GUI.ProcessEvent
end loop
GUI.Dispose (enterbutton)
colourback (blue)
Text.Locate (maxrow - 1,1)
put GUI.GetText (amountfield)," ", GUI.GetText (measurement1field)




Please specify what version of Turing you are using
4.1
 
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Jan 13, 2011 2:10 pm   Post subject: RE:gui.creatextfield help

What does the error(s?) say?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
 
shanestillwell




PostPosted: Thu Jan 13, 2011 2:18 pm   Post subject: Re: gui.creatextfield help

says that there is a syntax error at (import GUI) and also that my measurement1recieved, mesurement2recieved, amountrecieved variables are all the wrong type of arguments
 
DemonWasp




PostPosted: Thu Jan 13, 2011 2:42 pm   Post subject: RE:gui.creatextfield help

You accidentally stripped the border field (value used in Turing Help is GUI.INDENT) from your CreateTextFieldFull lines. Additionally, you haven't defined the measurement2received procedure you reference.
 
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: