Transpiled version (6452L) is out of date.
1 | static <A> SimpleLiveValue<A> varWithNotifyToLiveValue_verbose(Class<A> type, IVarWithNotify<A> var) { |
2 | if (var == null) null; |
3 | var lv = new SimpleLiveValue<A>(type); |
4 | var lvRef = weakRef(lv); |
5 | var.onChange(r { |
6 | var lv = lvRef!; |
7 | if (lv == null) |
8 | var.removeChangeListener(this); |
9 | else { |
10 | var value = var!; |
11 | print("varChange " + value); |
12 | lv.set(value); |
13 | } |
14 | }); |
15 | lv.onChange(-> { |
16 | var value = lv!; |
17 | print("lvChange " + value); |
18 | var.set(value); |
19 | }); |
20 | var value = var!; |
21 | print("varToLvInit " + value); |
22 | lv.set(value); |
23 | ret lv; |
24 | } |
Began life as a copy of #1034093
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034515 |
Snippet name: | varWithNotifyToLiveValue_verbose |
Eternal ID of this version: | #1034515/2 |
Text MD5: | 14e1a1fabc9e3429ecc6c400e6b42da4 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-10 05:33:40 |
Source code size: | 599 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 202 / 235 |
Version history: | 1 change(s) |
Referenced in: | [show references] |