Project

General

Profile

Actions

Support #5254

closed
CL

API: Support with a string.

Support #5254: API: Support with a string.

Added by Cassio Luz S. over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/16/2021
Due date:
% Done:

0%

Estimated time:
Operative System:
All

PA Updated by Per Amundsen over 4 years ago Actions #1

It looks like you are trying to use the pywrapper, I would not recommend that. After I made it, I discovered that converting between python and .net objects is incredible hard so you are basically doing .NET with python syntax but can't use all the great python features and frameworks.

Somebody wrote this great guide for how it's done in C# https://github.com/AdiIRC/apiv2/tree/master/docs/tutorial-

I'm gonna delete all the wrappers since they are not use-able in the current form.

To answer the question, you are suppose to do pluginHost.ActiveIWindow.RealWindowName, pluginHost.ActiveIWindow is derived from the IWindow interface, can't use interfaces directly, they are just meta descriptions that describes the available variables, functions and properties.

CL Updated by Cassio Luz S. over 4 years ago Actions #2

I see.

Same rule is valid for ITools, IServer, etc?

PA Updated by Per Amundsen over 4 years ago Actions #3

yes, you can't use I<anything> directly, only the instances derived from them.

For e.g IServer, there is typically a parameter for a event that contains a "server" instance which is derived from IServer which you interact it, or you can enumerate or retrieve a server instance from the pluginHost.GetServers() API.

There is a global instance of ITools in pluginHost.Tools, not sure if it works with the pywrapper, it definitely works in C#.

Something like this: pluginHost.Tools.Debug("hello world");

CL Updated by Cassio Luz S. over 4 years ago Actions #4

Thank you

PA Updated by Per Amundsen over 4 years ago Actions #5

  • Status changed from New to Closed
Actions

Also available in: PDF Atom