Posted 10 years ago by LeeYongWoo
Version: 14.2.0611
Avatar

Hello,

I enjoy the python add-on.
I am confronted with the following completion problem.

Add to search path,
editor know the import module name, but it doesn't know module's filed, method.

Run the sample, completion is working well, but my code - very simple - is not working..
Of course, required reference is added, this code compile is success.

// G:\sample\Tool.py 

public partial class MainWindow : Window
{ 
   public MainWindow() 
   { 
       InitializeComponent(); 
       codeEditor.Document.Language = new PythonSyntaxLanguage(PythonVersion.Version2);

       var project = codeEditor.Document.Language.GetProject(); 
       project.SearchPaths.Add(@"G:\sample");
   } 
 ....

in syntaxeditor..

import Too  # => completion is working. Module name is filled automatically. 
Tool.       # => completion is not working. No popup. Syntax error("identifiter expected") occured. 
            # In that case, it doesn't call "OnSessionOpening()" 
            # (Inherit completionprovider, override OnSessionOpening method to check) 
            # but sample is working well..

[Modified 10 years ago]

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

In the 2014.2 version of our Python add-on, the resolver and IntelliPrompt features are a good start.  That being said, we've completed some major improvements to them for the 2015.1 version.  Especially in relation to the importing of packages/modules.  We're not sure of a release date for the 2015.1 version yet since we're still working on new controls for it.

Back to your question though. In the sample above, you are importing "Too" but then doing completion on "Tool" (different identifier).  That might be what is wrong in this particular scenario.


Actipro Software Support

The latest build of this product (v24.1.3) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.