Duplicate Function Name error

I have a global method whose name happens to be the same as the name of a stored calc. Servoy is flagging this as a duplicate function name error and the function won’t fire.

I find it odd that it considers this a conflict. When called, the global will have “globals.” in front of it and the calc won’t so I don’t see the conflict.

Is this intended behavior?

amcgilly:
I have a global method whose name happens to be the same as the name of a stored calc. Servoy is flagging this as a duplicate function name error and the function won’t fire.

I find it odd that it considers this a conflict. When called, the global will have “globals.” in front of it and the calc won’t so I don’t see the conflict.

Is this intended behavior?

Hi Adrian,
from what I’ve understood, calcs inherit from globals, meaning they share the same scope.
Just like in globals.js you could use a globals variable without prefixing it, I guess that it is the same in calcs: just try using a globals variable in a calculation without “globals.” in front of it and it should work if this is the case.
I don’t know if this is intended but I think it works this way anyway…

calculations dont run in the global scope, they have there own Table Scope where they run in.

globals and calculations should be able to use duplicate names, if that is not the case then thats a bug,
are you somehow using the same UUID? (see the doc above the function) This is not allowed.