!7 cm DiffTwoSnippets { S s1, s2; transient JTextArea taDiff; visual northAndCenterWithMargins( centerAndEastWithMarginInbetween(jhgrid( withLabel("Snippet 1 (\"-\"):", onEnter(jLiveValueTextField_bothWays(dm_fieldLiveValue('s1)), rThread go)), withLabel("Snippet 2 (\"+\"):", onEnter(jLiveValueTextField_bothWays(dm_fieldLiveValue('s2)), rThread go))), jbutton("Diff!", rThread go)), taDiff = typeWriterTextArea()); void go enter { temp dm_tempDisableButtons(); S text1 = loadSnippet(trim(s1)); S text2 = loadSnippet(trim(s2)); setText(taDiff, "Diff between " + s1 + " and " + s2 + ":\n\n" + or2(unidiff_rtrim(text1, text2), "no differences"); } }