abstract sclass DynCalculatedList extends DynModule { transient JList list; transient L<S> results; transient bool calculateWhenHidden; visualize { ret list = jlist(calc()); } void unvisualize() { list = null; } void update() { temp enter(); if (list != null || calculateWhenHidden) fillListWithStrings(list, results = calc()); } // Note: This is called on every update, so you should cache // results IN the calc function if they are expensive to make abstract L<S> calc(); void scrollDown { scrollAllTheWayDown(list); } S selected() { ret selectedItem(list); } }
Began life as a copy of #1015929
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment