web stats
Ambivalent Code Template Names - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Thread Tools Display Modes
Old 03-25-2019, 09:21 AM
pmt pmt is offline
Mirth Newb
Join Date: Aug 2018
Posts: 6
pmt is on a distinguished road
Default Ambivalent Code Template Names

currently using mirth 3.4.2.

Following situation:

"Library 1" has a Template function test()
"Library 2" has a Template function test()

I can add both as dependencies to a new channel.
The channel then uses the one from "Library 2" (presumably because it is the last one to be parsed)

However, this is problematic because one cannot be sure which code is really executed, and if there is a sufficient amount of code templates, it becomes progressively harder to avoid collisions.

Do newer Versions of Mirth drop a warning/error in case one function overrides another in a channels' template scope?

Kind Regards
Reply With Quote
Old 03-26-2019, 09:38 AM
agermano agermano is offline
Mirth Guru
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,062
agermano is on a distinguished road

If it is common for you to have functions with the same name in multiple libraries, you might want to add the functions to library objects instead of adding them to the global namespace.
Reply With Quote

code templates

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 07:50 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation