Jump to content

Why my custom C# extention does not execute when deployed to Spotfire WebPlauer/Consumer


Georgi Koemdzhiev

Recommended Posts

I have a simple custom Add-in that just displays a message to the user:

namespace GeorgiSpotfireCustomExtention

{

public class GeorgiEvent : CustomApplicationEventHandler

{

protected override void OnApplicationInstanceCreated(AnalysisApplication application)

{

base.OnApplicationInstanceCreated(application);

 

MessageBox.Show("On Application Instance Created");

}

}

}That is my CustomAddIn class:

public sealed class CustomAddIn : AddIn

{

// Override methods in this class to register your extensions.

protected override void RegisterApplicationEventHandlers(ApplicationEventHandlerRegistrar registrar)

{

base.RegisterApplicationEventHandlers(registrar);

 

registrar.Register(new GeorgiEvent());

}

}I am just trying to learn the package deployment process. When I am running it locally - in the installed Spotfire Analyst client it displays the message just fine:

 

However, when I package the extension, add it to the server (via the "Deployments & Packages" section, adding the "spk" file and then saving the area, the message is not shown when I try to open a document in the WebPlayer/Consumer.

Notes:I am choosing "TIBCO Spotfire Any Client" for my intended client in the Package Builder when building the spk file.

Link to comment
Share on other sites

You deployment method seems to be alright. However Windows Forms UI (Messagebox.Show()) are not supported in the Web Player because they are specific to a desktop platform, which is why this only works when running on the Spotfire Analyst.

At the same time, the AnalysisApplication events are only relevant to the Analyst and they do not work in web player.

Link to comment
Share on other sites

Yes, it is possible. You may want to check SDK examples.

Create a Custom Tool in TIBCO Spotfire

https://community.spotfire.com/wiki/create-custom-tool-tibco-spotfire

 

TIBCO Spotfire C# Extensions Overview

https://community.spotfire.com/wiki/tibco-spotfire-c-extensions-overview

Extending TIBCO Spotfire

https://community.spotfire.com/wiki/extending-tibco-spotfire

Link to comment
Share on other sites

Hi, thank you for your answer. I have previously seen all of the above links. However, I have not come across a resource on the TIBCO website where I can see an example of how to extend the capabilities of the WebPlayer specifically. I have seen many examples on how to extend the Spotfire Analyst but not the WebPlayer which is my only interest at the moment Do you know where I can find such a resource . 
Link to comment
Share on other sites

The custom tool example (SpotfireDeveloper.CustomToolsExample) that is part of the SDK, works against Spotfire Analyst as well as Web Player.

 

Pasting below some helpful links:

https://docs.tibco.com/pub/sfire_dev/area/doc/html/GUID-9E16BAAA-7891-45...

 

Even the Iron Python Scripts work in Analyst as well as Web player

IronPython Scripting in TIBCO Spotfire

https://community.spotfire.com/wiki/ironpython-scripting-tibco-spotfire

You may also want to check below

https://community.spotfire.com/wiki/tibco-spotfire-javascript-api-overview

https://community.spotfire.com/wiki/tibco-spotfirer-javascript-api-examples

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...