abstract sclass DynTextSplitter > DynModule { S text, function; LS actualOutput; LS output; switchable bool showQuoted; transient JList outputList; visualize { LiveValue<S> 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); } }
Began life as a copy of #1020148
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023912 |
Snippet name: | DynTextSplitter |
Eternal ID of this version: | #1023912/1 |
Text MD5: | c8ad16496ad82444f9430a7616f7902b |
Author: | stefan |
Category: | javax / text processing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-12 12:05:42 |
Source code size: | 969 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 251 / 620 |
Referenced in: | [show references] |