// VisitIfElse creates questions embedded in an its bodies and registers show/hide callbacks func (this *GUI) VisitIfElse(ifElse interfaces.IfElse, context interface{}) interface{} { guiQuestionsIfBody := handleQuestions(this, ifElse.IfBodyQuestions()) guiQuestionsElseBody := handleQuestions(this, ifElse.ElseBodyQuestions()) ifQuestionsEncompassingContainer := this.GUIForm.createQuestionTable(guiQuestionsIfBody) elseQuestionsEncompassingContainer := this.GUIForm.createQuestionTable(guiQuestionsElseBody) this.registerOnShowCallback(func() { this.GUIForm.addQuestionContainer(ifQuestionsEncompassingContainer) this.GUIForm.addQuestionContainer(elseQuestionsEncompassingContainer) this.showOrHideContainerDependingOnIfElseEval(ifElse, ifQuestionsEncompassingContainer, elseQuestionsEncompassingContainer) }) this.Symbols.RegisterCallback(func() { log.Debug("Received symbols update callback in IfElse") this.showOrHideContainerDependingOnIfElseEval(ifElse, ifQuestionsEncompassingContainer, elseQuestionsEncompassingContainer) }) return nil }