Hi, We already reported a bug. And yes the way before the fix is to call it twice. Gabriel
Envoyé de mon iPhone > Le 13 févr. 2020 à 19:16, Jeremy Roussak via 4D_Tech <[email protected]> a > écrit : > > I’m using METHOD SET CODE from a component to inject a callback method into > the host. It’s worked well until now but in v18 it going wrong. The code > (simplified) is > > C_TEXT($hostName;$componentName;$code) > $componentName:="_injectedMethod" > $hostName:="injectedMethod" > > METHOD GET CODE($componentName;$code) > METHOD SET CODE($hostName;$code;*) > > The method _injectedMethod in the component contains a few lines of comments, > for testing. > > This code creates a method in the host, called injectedMethod, as it should; > but the method is empty. > > If I execute the METHOD SET CODE call a second time, it injects the code of > _injectedMethod as it should, > > Can anyone enlighten me, before I post a bug report? > > Jeremy > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

