abstract sclass DynTextSplitter > DynModule { S text, function; LS actualOutput; LS output; switchable bool showQuoted; transient JList outputList; visualize { LiveValue lvOutputTitle = mapLiveValue(dm_fieldLiveValue('output), S, func(LS l) -> S { "OUTPUT" + (empty(l) ? "" : " (" + upper(n2(l, "item")) + ")") }); ret withMargin(jvsplit( jSection("INPUT", dm_fieldTextArea('text)), northAndCenterWithMargin( centerAndEastEastWithMargin( withLabel("Split function:", standardFunctionLiveValueComboBox(dm_fieldLiveValue('function))), dm_checkBox('showQuoted), jbutton("Do it", rThread compute)), jLiveValueSection(lvOutputTitle, jLiveValueList(dm_fieldLiveValue('output)))))); } void compute enter { setField(actualOutput := assertStringList(callAndMake(function, text))); setField(output := showQuoted ? quoteAll(output) : actualOutput); } }