Warning: session_start(): open(/var/lib/php/sessions/sess_4nha6dnt851u4i60t1mcki82aj, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule DiffTwoSnippets {
S s1, s2;
transient JTextArea taDiff;
visual northAndCenterWithMargins(
centerAndEastWithMarginInbetween(hgridWithSpacing(
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(text1, text2), "no differences");
}
}