Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Patching the Init Method
Greg_Griffiths_(ggriffiths_-_(deleted))
I have some code in an existing module which includes an Init method which populates an Assoc with some data. I need to add an extra item to this Assoc and created a patch to the Init method to add my item, however as patches are loaded after modules are loaded my change is never included. Can anyone tell me how to get this to work by patching or can I create a patch that will run at load time to add the data to the Assoc directly rather than replace functions ?
Find more posts tagged with
Comments
Janusz_Frydecki
Why don't you simply affect the assoc?If it is done at initializtion time, it is probably a global variable so you can probably call it from your own module.
Rolf_Poser_(eu0018377_-_(deleted))
Message from Rolf Poser via eLinkGreg:Tricky one - I think it would depend what the Assoc is and what Init istrying to do with it.I've done something similar with an existing webcmd/action that I neededto have available for an additional node type. In that case, adding itafterwards, I was able to update the cmdregistry to ensure that it get'slisted. But it can be tricky as you say, because patches might get loadedetc...Can you be more specific?Thanks,Rolf.> Patching the Init Method> Posted by Griffiths, Greg on 08/01/2006 11:51 AM>> I have some code in an existing module which includes an Init method which> populates an Assoc with some data. I need to add an extra item to this> Assoc and created a patch to the Init method to add my item, however as> patches are loaded after modules are loaded my change is never included.>> Can anyone tell me how to get this to work by patching or can I create a> patch that will run at load time to add the data to the Assoc directly> rather than replace functions ?>> [To reply to this thread, use your normal E-mail reply function.]>> ============================================================>> Discussion: Development Discussion>
https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303>>
; Livelink Server:>
https://knowledge.opentext.com/knowledge/llisapi.dll>>
; To Unsubscribe from this Discussion, send an e-mail to> unsubscribe.development@elinkkc.opentext.com.>>>
Hans Stoop
Message from Hans Stoop via eLinkThe order in which things are executed in Livelink makes it extremelydificult to patch Init functions.The only way I see how to do it, without much knowing about the module,is to create a new module with on orphan of the object of the init youwant to change. In the init functin of the orphan you can make thechanges to the Assoc().I can think of other solutions, but they all require the creation of anew module, unless you have CustomizationsRT installed. The I can giveyou a hack that doesn't require an installation of a new module.Hans> -----Original Message-----> From: eLink Discussion: Development Discussion > [mailto:development@elinkkc.opentext.com] > Sent: dinsdag 1 augustus 2006 17:55> To: eLink Recipient> Subject: Patching the Init Method> > Patching the Init Method> Posted by Griffiths, Greg on 08/01/2006 11:51 AM> > I have some code in an existing module which includes an Init > method which populates an Assoc with some data. I need to add > an extra item to this Assoc and created a patch to the Init > method to add my item, however as patches are loaded after > modules are loaded my change is never included. > > Can anyone tell me how to get this to work by patching or can > I create a patch that will run at load time to add the data > to the Assoc directly rather than replace functions ?> > [To reply to this thread, use your normal E-mail reply function.]> > ============================================================> > Discussion: Development Discussion>
https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303>
; > Livelink Server:>
https://knowledge.opentext.com/knowledge/llisapi.dll>
; > To Unsubscribe from this Discussion, send an e-mail to > unsubscribe.development@elinkkc.opentext.com.> > >
Greg_Griffiths_(ggriffiths_-_(deleted))
The reason I can't rework the INIT method is that it is not my module, and the patch has been written into my module which is running. The module is being used in several different situations - hence the need for patches e.g. one if you have CustomisationsRT, one if you don't etc.I can't update the main INIT method as this would have been run before the patch is run, so I would not be able to update the Assoc, I was hoping to be able to add a line (or two) or code in the patch to update the Assoc directly. I can't make the module I need the patch for as a dependancy to the module as the module may or may not be there - which is why I have the patches.