!7 concept Rule { S globalID = aGlobalIDUnlessLoading(); S text; S comments; } // Bug when making cmodule module Rules > DynCRUD { start { crud.multiLineFields = litset('text, 'comments); onConceptsChange(r { vmBus_sendMessage('gazelleRulesChanged, this) }); } // API Pair addRule(S when, S then) { ret addRule(when + "\n=> " + then); } Pair addRule(S text) { ret addRuleWithComment(text, null); } Pair addRuleWithComment(S text, S comment) { Pair p = uniq2_sync(Rule, +text, +comment); if (p.b) vmBus_sendMessage('gazelleRuleCreated, this, p.a); ret pair(p.a.globalID, p.b); } }