srecord noeq ComputerCountListener(StefansOS_ConnectToServer connector) { new VarWithNotify computerCount; bool verbose; void init { connector.onNewLine(line -> { new Matches m; if (swic(line, "ComputerCount = ", m)) { computerCount.set(parseInt(m.rest())); if (verbose) print("Computer count: " + get()); } }); connector.sub("computerCount"); }; LiveValue liveValue() { ret varWithNotifyToLiveValue(Int, computerCount); } Int get() { ret computerCount!; } }