[1.0.1] IDE: Error when copy pasting images

Asked by Rafiq Mohammed

Hi,
I am receving the following error when copy pasting the images in Sikuli 1.0.1 editor:

EditorPane: parseRange: Problem while trying to parse line Length must be positive

Could you please let me know how to resolve this error.

Thanks,
Rafiq

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

first of all, you should restart the IDE after such errors.

Seems to be some bug: could you exactly tell me, what you are doing.

Try to select a whole line or a block of code and adjust after pasting in the target.

Revision history for this message
Rafiq Mohammed (rcholayil) said :
#2

Hi RaiMan,
Even after restart, I am getting this error occasionally. I am just copying an image and pasting it in different places of my code. most of the "if exists()" lines in my code use the same image. Hence I am copying the previous instance of the image and pasting it where ever required. I have installed Sikuli 1.0.1 on a 64-bit Windows 7 machine and I have Java 7 installed on my machine.

Please let me know if you need any more details.

Thanks,
Rafiq

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Ok, understood - I will check a bit deeper.

but why don't you use variables:

img1 = "some-image.png"

if exists(img1) …

… this is the usual way, to write flexible code: one resource in one place and only references to it in others.

Can you help with this problem?

Provide an answer of your own, or ask Rafiq Mohammed for more information if necessary.

To post a message you must log in.