IDE Errors

Asked by Jeff_Vallis

1.1.1(2017-03-30_01:00)/Mac10.12.6/Java8(64)1.8.0_25-b17
First a simple problem - I seem to be having problems with Indents and am frequently having to un-indent and indent again

Main Issues

Error Box :-
Delete Images on Save
Content :-
Possible incomplete string in line 757
" Didn't find which number"
Yes: No images will be deleted!
No: Ignore and continue

My Code
Line number
754 elif Screen_Shot_File == "D-4":
755 Moves_Made = Moves_Made + 4
756 elif Screen_Shot_File == "D-3":
757 Moves_Made = Moves_Made + 3
758 elif Screen_Shot_File == "D-2":
759 Moves_Made = Moves_Made + 2
760 elif Screen_Shot_File == "D-1":
761 Moves_Made = Moves_Made + 1
762 if v_abort == 0:
753 # Didn't find which number
754 Screen_Shot_and_Copy("Dn"+v_Log_File,0)
755 Screen_Shot_File = Screen_Shot_File+"0"
756 if v_abort == 0:
757 Screen_Shot_File = Made_Move_Destiny_Part2(v_Log_File)
758 Gen_Message() ; print "Debug Destiny ",Screen_Shot_File

Error Box :-
Delete Images on Save
Content :-
Possible incomplete string in line 522
" Transformation moved as sometimes Transform reported as 3's 0 after move thet are always Trans - changed to 90%"
Yes: No images will be deleted!
No: Ignore and continue
line
522 Image_list.append( an image that is set to 90 on matching preview)
what is the message box telling me

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
Jeff_Vallis (vallis-pj) said :
#1

Looks like message box reporting wrong line number on
changed :
Possible incomplete string in line 757

changed the comment line on
753 # Didn't find which number
to
753 # Didnt find which number - ' removed

and error box disappeared on save
now the bottom pane only reports
[error] EditorPane: DeleteImagesOnSave: possible incomplete string in line 522
[error] EditorPane: cleanBundle aborted (uncomplete_comment_error)
of course with the line number being wrong on the first error ( 4 out ) I may be looking at the wrong line

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

--- First a simple problem - I seem to be having problems with Indents ...
- In the IDE preferences you should have switched on "Tab key inserts spaces ..." in the "Text Editing" tab
- chose a suitable number of spaces (I prefer 2 instead of 4 - more compact)
- always use the Tab-key now for indentation (Shift-Tab for unindent)

problems usually come up, if space-insert is switched off and one mixes manual indents with tabs and spaes.

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#3

My Setting is
Checked Tab Key insert spaces instead of tab
Tab Width 4
Font Monospaced
Size 14

So reply does not seem to be an answer to my issue - but I can live with it - more pressing is the other 2 issues
The 2 issues are new since I upgraded to :-
1.1.1(2017-03-30_01:00)/Mac10.12.6/Java8(64)1.8.0_25-b17
Before this started to happen I think I was on
sikulixsetup-1.1.0-20150819.231031-140-forsetup

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

--- what is the message box telling me
The delete-not-used-images-on-save feature scans the script text for given images, to find out, which are obsolete and can be deleted from the script folder.
In the first implementation in commented script lines containing code, that is temporarily inactivated this way, images in there were deleted, since comments where skipped completely.
Now even comments are scanned, but there is a problem with comments containing either " or ' with an unequal number, as in your case in line 522:
 Transformation moved as sometimes Transform reported as 3's 0 after move thet are always

The solution is, to either not use " or ' in comments or an even number of those.

I will look into it with some lower priority, to check wether this can be optimized.

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

--- So reply does not seem to be an answer to my issue
So if you obey this:
- always use the Tab-key for indentation (Shift-Tab for unindent)

then the only possible source for indent problems are the auto-indents when pressing return after a line of code, that needs the following line to be indented.

So please report a special case where you have such an indent-problem.

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#6

Your Reply
Now even comments are scanned, but there is a problem with comments containing either " or ' with an unequal number, as in your case in line 522:

Don't understand the reply :-
line
522 Image_list.append( an image that is set to 90 on matching preview)
what is the message box telling me

Error Box :-
Delete Images on Save
Content :-
Possible incomplete string in line 522
" Transformation moved as sometimes Transform reported as 3's 0 after move that are always Trans - changed to 90%"
Yes: No images will be deleted!
No: Ignore and continue

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#7

damn
Thought that
" Transformation moved as sometimes Transform reported as 3's 0 after move that are always Trans - changed to 90%"

was your message

my code line 528 not 522 is
    # Transformation moved before as sometimes Transform reported as 3's - after move now they are always Trans - changed to 90%

So the main problem is that the line number reported by the IDE is incorrect

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

--- So the main problem is that the line number reported by the IDE is incorrect
This might be. I will check that too, when I look deeper into that problem.

Nevertheless: To avoid any problems like that:
- switch off "delete images on save" in the preferences
- or take care about:
Either not use " or ' in comments or an even number of those.

Anyway, thanks for reporting.

Can you help with this problem?

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

To post a message you must log in.