Snippet #1007528

!7

p-substance-noconsole {
  final AutoComboBox cb1 = aiConceptsComboBox();
  final AutoComboBox cb2 = aiConceptsComboBox();
  final AutoComboBox cb3 = aiConceptsComboBox();
  showFormTitled("Add Relation",
    "Concept 1", cb1,
    "Relation", cb2,
    "Concept 2", cb3,
    func {
      pcall-messagebox {
        fS c1 = jGetGlobalID(cb1);
        fS c2 = jGetGlobalID(cb2);
        fS c3 = jGetGlobalID(cb3);
        assertTrue("Please fill all fields", allNempty(c1, c2, c3));
        thread {
          loading {
            addTruthWithInfoBox(c2 + " " + c1 + " " + c3);
            disposeFrame(cb1);
          }
        }
      }
      false;
    });
}