Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1032996 // test_tok_eventInterfaces

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4928L) is out of date.

1  
set flag tok_formatDollarVars_debug.
2  
3  
svoid test_tok_eventInterfaces() {
4  
  // no args
5  
  testTranspilationFunction tok_eventInterfaces(
6  
    [[
7  
      transient event interface onRecordAdded as OnRecordAdded shipping RecordAdded;
8  
    ]],
9  
    [[
10  
      interface onRecordAdded {
11  
        void OnRecordAdded(RecordAdded event);
12  
      }
13  
      
14  
      transient L<onRecordAdded> OnRecordAdded_listeners;
15  
      synchronized selfType OnRecordAdded(onRecordAdded l) { OnRecordAdded_listeners = addOrCreate(OnRecordAdded_listeners, l); this; }
16  
      synchronized Cl<onRecordAdded> OnRecordAdded_listeners() { ret cloneList(OnRecordAdded_listeners); }
17  
      void OnRecordAdded(RecordAdded event) { for (l : OnRecordAdded_listeners()) pcall { l?.OnRecordAdded(event); } }
18  
    ]]);
19  
}

Author comment

Began life as a copy of #1027846

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032996
Snippet name: test_tok_eventInterfaces
Eternal ID of this version: #1032996/6
Text MD5: cfb3caaa5afb381096226f7686aa2393
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-11 11:00:37
Source code size: 784 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 192 / 283
Version history: 5 change(s)
Referenced in: [show references]