One Dimensional Form Layout
The following functions create and display a one-dimensional in standard form:
someInt = hiCreateIntField(
?name 'numScoops
?prompt "Number of scoops (0..5)"
?value 2
?defValue 1
?range '(0 5) )
myCyclic = hiCreateCyclicField(
?name 'flavor
?prompt "Flavor"
?value "chocolate"
?choices list("chocolate"
"strawberry" "vanilla"
"peppermint" "coffee"
"green_tea") )
mytoggle = hiCreateToggleField(
?name 'toppings
?prompt "Toppings"
?choices list('(wCream "Whipped
cream?")
list(’nuts "any nuts?")
'(jimmies))
?value '(t t nil)
?numSelect 3 )
aRadio = hiCreateRadioField(
?name 'coneSize
?prompt "Cone Size"
?value "Large"
?defValue "Small"
?choices list("Small" "Medium"
"Large" ))
hiCreateAppForm( ?name 'iceCreamForm
?formTitle "Ice Cream"
?callback "buildIceCreamCone()"
?fields list( someInt myCyclic mytoggle aRadio )
?help "cream" )
status = hiDisplayForm( iceCreamForm )
The user can change the values of this form through the Command Interpreter Window. The user has a handle into the form and each of its fields through what is created by hiCreateAppForm or hiCreateForm( ). For example, the user can change the number of scoops from 2 to 5 by typing
iceCreamForm->numScoops->value = 5
The cone size can be altered to medium by typing
iceCreamForm->coneSize->value = "medium"
Return to top