sclass SystemStatus extends Module { JComponent visualize() { ret jSection("SYSTEM STATUS", makeBold(fontSize(25, jCenteredLiveValueLabel(systemStatus)))); } } // changes the icon of all error-having modules' frames to a little flash icon sclass ErrorIcon extends Module { void update { for (Module m : onModules()) { O error = m.getError(); if (error != null) internalFrameIcon(m.vis, #1101276); } } } sclass LastErrors extends StaticModule_CalculatedList { L errors = synchroList(); int errorsToKeep = 10; void addError(Throwable e) { if (e == null) ret; addToListWithMaxSize(errors, persistableThrowable(e), errorsToKeep); change(); } L calc() { ret allToString(cloneList(errors)); } } sclass Debug_PrintChangedModules extends Module { IConceptIndex idx = new IConceptIndex { public void update(Concept c) { print("Change in concept " + c); } public void remove(Concept c) {} }; void start() { addConceptIndex(idx); } void cleanMeUp { removeConceptIndex(idx); } }