!7 cmodule PieceDatabase { S piece = "white king"; transient MultiMap multiMap; transient ImageSurface is; transient ReliableSingleThread rst = dm_rst(module(), r update); start-thread { multiMap = pairsToCIMultiMap(chessOCR_squareImagesCollectorFromAGIBlue().allImages()); rst.trigger(); } void update { if (multiMap == null || is == null) ret; is.setImage(mergeBufferedImagesHorizontally(multiMap.get(replaceObject(piece, "empty square", "empty")))); } visual withComputing(rst, northAndCenterWithMargins( main.onChange(rst, dm_comboBox piece(replace(ai_chessPieces(), "empty", "empty square"))), jScroll_center(is = jImageSurface()))); }