// createGUIQuestion creates a GUIQuestion, the last argument indicates if the question should be disabled (no entry allowed) func createGUIQuestion(question interfaces.Question, callback func(interfaces.Expr, error), disabled bool) *GUIQuestion { questionLabel := createLabel(question.LabelAsString()) guiElementVisitor := newQuestionTypeToGUIElementVisitor(question, callback, disabled) questionElement := question.VarDeclValueType().Accept(guiElementVisitor, nil).(ui.Control) errorLabel := createLabel("") return &GUIQuestion{questionLabel, questionElement, errorLabel, question} }