Libraryless. Click here for Pure Java version (13141L/80K).
1 | // pretty dirty, especially regarding cleanup of main classes |
2 | svoid dm_replaceModuleInstance(DynModule newInstance) { |
3 | assertNotNull(newInstance); |
4 | O stem = dm_stem_mandatory(); |
5 | O oldInstance = get(stem, "o"); |
6 | if (oldInstance != newInstance) { |
7 | print("Replacing instance for module " + dm_moduleID() + ": " |
8 | + oldInstance + " => " + newInstance); |
9 | set(stem, o := newInstance); |
10 | |
11 | // Revisualize because UI often has pointers into the module instance |
12 | dm_revisualize(); |
13 | } |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1031820 |
Snippet name: | dm_replaceModuleInstance - replace module's instance with a new one |
Eternal ID of this version: | #1031820/4 |
Text MD5: | 560194d803510814c39e14634a410443 |
Transpilation MD5: | d94d587ddbbfde28dfe8f73213fd45fb |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-07-11 16:30:41 |
Source code size: | 513 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 70 / 109 |
Version history: | 3 change(s) |
Referenced in: | [show references] |