file Peer function inaccessible from Jython in library

2 weeks 2 days ago #6289 by joset
Hi,

I develop a Module Peer function that works perfectly inside Jython script.

When i move this code to Jython library, Modelio syas:
AttributeError: 'fr.acceliance.modelio.utils.impl.ModelioUtilsPeerM' object has no attribute 'getModelioContext' in <script>

Why does the peer function is not seen when moving the Jython code to Jython lib ?

Thans in advance, José

Please Log in or Create an account to join the conversation.

6 days 11 hours ago #6309 by cma
Hello,

ModelioContext getModelioContext() is a method on IModule, not IPeerModule.
A IPeerModule is a public API intented to be shared with other modules.
The IModelioContext is private to the module and is not to be shared with other modules that's why it is not on IPeerModule .

Regards,

CMA

Please Log in or Create an account to join the conversation.

1 day 17 hours ago #6324 by joset
Hi,

I managed to do it with the code inside Modult.Init =>

IModuleService moduleService = getModuleContext().getModelioServices().getModuleService();
modelioUtilsModule = moduleService.getPeerModule(IModelioUtilsPeerModule.class);

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.066 seconds
^ Back to Top