Project

General

Profile

Actions

Support #5254

closed

API: Support with a string.

Added by Cassio Luz S. about 3 years ago. Updated about 3 years ago.

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

0%

Estimated time:
Operative System:
All

Actions #1

Updated by Per Amundsen about 3 years ago

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.

Actions #2

Updated by Cassio Luz S. about 3 years ago

I see.

Same rule is valid for ITools, IServer, etc?

Actions #3

Updated by Per Amundsen about 3 years ago

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");

Actions #4

Updated by Cassio Luz S. about 3 years ago

Thank you

Actions #5

Updated by Per Amundsen about 3 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF