← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #261129]: IntelliJ IDEA 14.02 unresolved references after import [from sikuli import *]

 

Question #261129 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/261129

    Status: Answered => Open

Tset-Noitamotua is still having a problem:
Thanks for the quick reply, Raiman.

I followed your recommendation and removed all java level imports und used
"normal" method calls (e.g. s.click()). This almost solved the problem but
there is still one unresolved reference left: SCREEN    A example of usage
can be seen here:
https://github.com/Tset-Noitamotua/Sikuli-and-Robot-Framework-Integration/blob/Windows-8.1/step_3/calc.sikuli/logger.py#L52

(Line 52) - What can I do in this case?

2015-01-24 0:01 GMT+01:00 RaiMan <question261129@xxxxxxxxxxxxxxxxxxxxx>:

> Your question #261129 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/261129
>
>     Status: Open => Answered
>
> RaiMan proposed the following answer:
> this is by intention/design or however you name it and cannot be solved,
> when you are using the undotted Region and Screen ,methods outside the
> Sikuli IDE in other IDE's having auto-complete and continous
> compile/syntax check.
>
> a method use like
> click(some_image)
>
> is dynamically at runtime interpreted as
> SCREEN.click(some_image)
>
> where SCREEN is a constant object created as Screen() internally.
>
> So any compile time engine MUST produce these errors.
>
> Your solution is the worst possible though, since it leads to a mix of
> Python level and Java level Region objects, which still might lead to
> strange situations.
>
> If you want to be strict, you have to set aside the usage of undated
> methods completely and script "normally"
>
> for all actions not bound to a specific region:
>
> SCREEN.click()
>
> or once at the beginning
> s = Screen()
>
> and later:
> s.click()
> s.wait()
>
> ...
>
> Everything needed is already imported by
> from sikuli import *
>
> ... never import anything from the Java level from the classes Region or
> Screen, because these classes are overwritten/wrapped on the Python
> level.
>
> I hope, I find a better solution for version 2. But any solution will not
> allow to use undotted methods in other IDE's than the Sikuli IDE.
> So start today, to live without it, if you want to use IntelliJ.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/261129/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/261129
>
> You received this question notification because you asked the question.
>

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.