简体   繁体   English

为什么将我的自定义C#扩展部署到Spotfire WebPlauer / Consumer时不执行

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

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: 那是我的CustomAddIn类:

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: 当我在本地运行时-在已安装的Spotfire Analyst客户端中,它显示的消息很好:

在此处输入图片说明

However, when I package the extention, 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. 但是,当我打包扩展时,将其添加到服务器(通过“ Deployments&Packages”部分,添加“ spk”文件,然后保存区域),当我尝试在WebPlayer中打开文档时不显示该消息。 /消费者。

Notes: I am choosing " TIBCO Spotfire Any Client " for my intended client in the Package Builder when building the spk file. 注意: 构建spk文件时,我在程序包构建器中为预期的客户端选择“ TIBCO Spotfire任何客户端 ”。

from the Spotfire Wiki (emphasis mine): 来自Spotfire Wiki (重点是我的):

WinForms graphical user interface is a component of the .NET Framework and not something supplied by Tibco Spotfire. WinForms图形用户界面是.NET Framework的组件,不是Tibco Spotfire提供的。 It's not recommended to implement solutions using Forms, but sometimes it could be handy when debugging. 不建议使用Forms实现解决方案,但有时在调试时可能会很方便。 There is no commitment that it will work in future versions of the Analyst client. 没有承诺它将在将来的Analyst客户端版本中运行。 Forms are not supported on the Web Player. Web Player不支持表单。

the example listed on the wiki is for IronPython, but presumably the same holds true for C# extensions. Wiki上列出的示例适用于IronPython,但对于C#扩展也是如此。

Correct. 正确。 My assumption, and I don't really know a lot about .NET, so this is not absolute, is that the form is rendered on the machine executing the code. 我的假设对.NET并不十分了解,因此并不是绝对的,因为表单是在执行代码的计算机上呈现的。 In the case of your example above, the dialog would pop on the Node Manager host. 对于上面的示例,对话框将在节点管理器主机上弹出。 If you're really set on using an alert like this, you can accomplish it in JavaScript with an 'alert()'. 如果您真的想使用这样的警报,则可以使用“ alert()”在JavaScript中完成。 There is probably a way to render dialogues o in the web client too, but I don't know it offhand. 可能也有一种方法可以在Web客户端中呈现对话,但是我不知道这种用法是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM