gui.creatextfield help
Author |
Message |
shanestillwell
|
Posted: 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

|
|
 |
Tony

|
|
|
|
 |
shanestillwell
|
Posted: 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
|
Posted: 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. |
|
|
|
|
 |
|
|