Unable to call a method from one module to another.

Forum to discuss the new web client version of Servoy.

Unable to call a method from one module to another.

Postby aijazalee889 » Wed Oct 05, 2022 1:21 pm

Hey, All

I am unable to call a method from one module to another module, how it can be done?

any suggestion or idea would be greatly appreciated.

Thanks
Aijaz Ali
aijazalee889
 
Posts: 7
Joined: Wed Oct 05, 2022 1:20 pm

Re: Unable to call a method from one module to another.

Postby rph » Thu Oct 06, 2022 2:19 pm

Hi

I'm not quite sure if I understand you right. If you have a module "A" and within this module you have a scope "myscope" and within that you have a function "myfunction" and then you have a module "B" and within this you want to call the function "myfunction", then you have just to make sure module "A" is included in module "B" (solution property "moduleNames") and then you can call it like this:

scopes.myscope.myfunction();

Be aware: you can only include one module in another but not visversa because of circulare dependency is not possible. So you can include module "A" ind module "B" but then you can not include module "B" in "A".

Hope this helps.

Best
Roland
rph
 
Posts: 75
Joined: Wed Aug 10, 2011 11:44 am
Location: Cham, Switzerland

Re: Unable to call a method from one module to another.

Postby aijazalee889 » Fri Oct 07, 2022 6:42 am

Hi, Roland

Thanks for the answer.

Exactly I was doing that, now I have got it, by adding module name in "moduleNames" property.

Thanks
Aijaz Ali
aijazalee889
 
Posts: 7
Joined: Wed Oct 05, 2022 1:20 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 9 guests