Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB.NET Function in Map

1 view
Skip to first unread message

Siva

unread,
Jul 15, 2009, 11:05:01 AM7/15/09
to
Hi,

Could I have same function name in different maps? For example, Map A has
public function "getInvoiceNumber" in script functiod. Map B has similar
public function name "getInvoiceNumber" in script functiod. Both map will be
used under one solution, application and orchestration. Will it give any
issue?

My understanding is, it wouldn't give any issue since both map treated as
separate objects. As long as I dont have same function name under one map,
Map will works without any issue. Am I correct? Or I should have different
function names in each maps?

Does same apply to public global variable in maps?

Thank you in advance,

Siva

--
Thank you,

Siva

Ronbo

unread,
Sep 30, 2009, 7:09:02 PM9/30/09
to

Not a great idea if these are under the same namespace and in the same
assembly. It would probably work, but you're asking for trouble.

Are these copies of the same function? If so, just put the function in to
an assembly and point to it from both maps. If it isn't the same code, then
using the same name for two different things is just bad form.

Generally I'm not a fan of putting chunks of code in the script functoid,
unless its very very simple stuff. I prefer to have one assembly with all of
my code for scripts in the maps, and point to it from within each scripting
functoid. For one thing, when I'm testing I often have to tweak that code,
and it makes it easier if it isn't in the map. For another, it promotes code
re-use, always a good thing.

0 new messages