I have the following 2 modules br_boss_chart_faktura and br_boss_chart_faktura_bookingAccounts. I need to call methods from the modules scopes, but I get the following errors, if I add them mutually to the known modules.
A cycle was detected in the build path of project: BOSS BOSS Build path Build Path Problem
A cycle was detected in the build path of project: br_boss_chart_faktura br_boss_chart_faktura Build path Build Path Problem
A cycle was detected in the build path of project: br_boss_chart_faktura_bookingAccounts br_boss_chart_faktura_bookingAccounts Build path Build Path Problem
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.
How can I realize that, without getting the above errors?
deezzub:
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.
Not possible.
The only way is to move functions to a new module which you can reference from both modules you mentioned.
deezzub:
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.
Not possible.
The only way is to move functions to a new module which you can reference from both modules you mentioned.
Hi Marc, or I call the functions like scopes[ ‘br_boss_chart_faktura_scopename’ ] ‘functionName’ without adding the modules mutually?
Sure you can weak-link it.
But whatever you do you need to fix the circular reference or you can’t export (i.e. deploy) your solution (well maybe if you disable all the error markers).
In any case best practice is what Marc described…or use Servoy’s svyApplicationCore module which features a listener/broadcaster pattern (which I haven’t tested yet myself).
deezzub:
In br_boss_chart_faktura I need to call functions from br_boss_chart_faktura_bookingAccounts and in br_boss_chart_faktura_bookingAccounts I need to call functions from br_boss_chart_faktura.