I'm experimenting with ]Link and I'm trying to add a hook. Somehow, the following code doesn't work for me, so can anyone give a hint what I'm doing wrong?
Code: Select all
load←⎕ns''
load.beforeRead←{⎕this.called+←1 ⋄ 1}
load.called←0
options←⎕ns''
options.beforeRead←'load.beforeRead'
options ⎕SE.Link.Create 'ws' '/path/to/ws'
⍝ load.called still returns 0
I'm on Dyalog version:
Version: 18.0.39803.0 64 Unicode
Created: Jan 7 2021 at 20:02:30
Build ID: 4d00828c
[EDIT:] Additional info: My link version seems to be 2.0.5. It semes that hooks were already implemented back then, because if I pass an empty opts namespace, I get variables beforeRead and beforeWrite after executing LINK.Create, however, when debugging I can't find any reference, where these options are used. When did you introduce the hooks?
Thank you very much!
Tobias