two addins, same code, different functions

  • Thread starter Shawn the sheep
  • Start date
S

Shawn the sheep

Hi,

This is a bit tricky to explain but I try. I have two addins,
effectively copies of each other, that I wrote. They are both loaded
at the same time, but based on a set of variables, create different
results, mainly based on colours and positioning etc. The addins
create custom menus on load. My problem is that the addins don't run
the code in isolation, so I get cross-overs. Say I have a menu item 1
in addin A, that calls routine say "test". Addin B has a menu item 1,
which also calls route "test". That same routine exist in addin A and
B. The problem is, that I would like addin A to call "test" of addin
A, and addin B to call "test" in addin B - this doesn't work.
Whichever addin is loaded first then takes priority and that routine
is called. The "test" in addin B is never called. So.... how can I run
the routines in isolation, how can I tell the onAction property for
menu item 1 in addin B to call a different "test" than the one in A?
Before you ask - there are lot of routines and renaming them all isn't
an option, because I would consider that 'bodge' and it would only
delay the inevitable question - what happens if I had three addins? I
just need to be able to run specific code for each addin...

Any ideas? Can it be done?

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top