cancel
Showing results for 
Search instead for 
Did you mean: 

Problems Regarding Registration of the Addon

Former Member
0 Kudos

Hi All,

I have developed an addon, and tried installing the same on my local machine. I have generated the.ard file using the AddOnRegDataGen.exe. .When I run my code on the local system it works fine,when I register it as an Addonand try running it, it registers.But when i click on the Delivary form, for which the addon ahs been developed, it prompts with a message box saying "Addon Packing Disconnected"..

Can anyone of u guys ,guide me on the same. I am not able to figure out where I am losing the Track.

Accepted Solutions (1)

Accepted Solutions (1)

rasmuswulff_jensen
Active Contributor
0 Kudos

I think you have the same problem as I've had today, and also had a few months back (Where i rewrote all my code and the problem disappeard)... Well today I think I found the (silly) problem...

My findings was that it has something to do with the order you set up your eventhandlers!

I had an addon that handled the events in this order:

- AppEvent

- MenuEvent

- ItemEvent

This did not give any problem running the code through Visual Studio, but if made with a ard + installer the "addon has been disconnected" box appeared

After some fusterating thinking I change the order of the way the the eventhandlers was set up to:

- MenuEvent

- ItemEvent

- AppEvent

(Had an addon the worked with that, so after testing everthing else I was desperate

Don't ask why but this did the trick... and the addon has no problem now...

Might help you...

Former Member
0 Kudos

By any means this seems bizzare and interesting. Can any one of SAP in this forum give an explanation to this behaviour if you think it is correct please?

Rasmus - can you please elaborate on this, what do you mean by the Order of event handling????

Thanks,

Indika

rasmuswulff_jensen
Active Contributor
0 Kudos

This is indeed a bizzare question

By order I simply which of the event you write in you code first so (C# Example):

...Make UI connection before this

*******************************************************

//AppEvent first - This work in debug but NOT in ard

sboApplication.AppEvent+=new IApplicationEventsAppEventEventHandler(sboApp_AppEvent);

sboApplication.MenuEvent+=new IApplicationEventsMenuEventEventHandler(sboApp_MenuEvent);

sboApplication.ItemEvent+=new IApplicationEventsItemEventEventHandler(sboApp_ItemEvent);

***************************************************

//AppEvent last - This work in debug AND ard

sboApplication.MenuEvent+=new IApplicationEventsMenuEventEventHandler(sboApp_MenuEvent);

sboApplication.ItemEvent+=new IApplicationEventsItemEventEventHandler(sboApp_ItemEvent);

sboApplication.AppEvent+=new IApplicationEventsAppEventEventHandler(sboApp_AppEvent);

*******************************************************

I don't know if this is a C# specific problem but still bizzare is the right word

btw.

You can sometimes also get the "Addon is disconnected" if you have an unhandled exception during startup (Not all exceptions surface the addon when dealing with com-objects, so try, catch is recommended)

Answers (1)

Answers (1)

barend_morkel2
Active Contributor
0 Kudos

Hi Vinayak,

Ensure the Add-On receives the connection string from SBO and not the string that you set as the parameter for testing purposes (in your development environment).