I found the error triggering code line at last, it has nothing to do with the writing like "Else If" or "ElseIf", "End If" or "End If".
The amazing fact is, that under BlitzMax 1.20 some source code is compiled without error whether you remarked a certain "End If" or not !
(See Code line 657)
Type appDrawing
Method RefreshState()
' a Tool Tip has no states or mouse actions to evaluate:
If drawGuiType =2 Then Return
' for drawToggle =TRUE:
Local mouseIsOver:Int =False
' first calculate the current state and add it to the stack
If drawCurrentState <8 Then
' 8, 9, 10, 11, 12, 13: RETURN-states, overrides mouse actions
' 14 : for orientDrawing only: assigned appText currently gets edited
' 15, 16, 17, 18, 19, 20: states of an appDrawing serving as a column of a List line
If appMouseFound =False Then
If p =1 Then
' Mouse is just over appDrawing
' custom mouse pointer for that appDrawing set ?
If drawCustomMouse <>Null Then
Else
End If
' updated Tool Tip for that appdrawing ?
If drawSpecialToolTip >0 Then
If drawScrollBar <>Null Then
If drawScrollBar Then
If drawSpecialToolTip <5 Then
Else
End If
Else
If drawSpecialToolTip <5 Then
Else
End If
End If
If drawSpecialToolTip =2 Or drawSpecialToolTip =6 Then
If drawGuiType =10 Or drawGuiType =110 Then
ElseIf (drawGuiType =>11 And drawGuiType <=14) Or (drawGuiType =>111 And drawGuiType <=114) Then
ElseIf drawGuiType =15 Or drawGuiType =115 Then
End If
ElseIf drawSpecialToolTip =3 Or drawSpecialToolTip =7 Then
If drawGuiType =10 Or drawGuiType =110 Then
ElseIf (drawGuiType =>11 And drawGuiType <=14) Or (drawGuiType =>111 And drawGuiType <=114) Then
ElseIf drawGuiType =15 Or drawGuiType =115 Then
End If
ElseIf drawSpecialToolTip =4 Or drawSpecialToolTip =8 Then
If drawGuiType =10 Or drawGuiType =110 Then
ElseIf (drawGuiType =>11 And drawGuiType <=14) Or (drawGuiType =>111 And drawGuiType <=114) Then
ElseIf drawGuiType =15 Or drawGuiType =115 Then
End If
End If
If drawToolTipText <>curTip Then
If drawToolTipCreated Then DeleteToolTip =1
End If
Else
If drawToolTipCreated Then DeleteToolTip =1
End If
End If
If Not(drawToolTipShown) Then
If drawToolTipText <>"" Then
If Not(drawToolTipCreated) Then
End If
If appCustomMouseUsed Then
End If
If appMouseX +offsetX +drawToolTipdrawImgWidth >appWidth Then
Else
End If
If appMouseY +offsetY +drawToolTipdrawImgHeight >appHeight Then
Else
End If
End If
Else
If appCustomMouseUsed Then
End If
If appMouseX +offsetX +drawToolTipdrawImgWidth >appWidth Then
Else
End If
If appMouseY +offsetY +drawToolTipdrawImgHeight >appHeight Then
Else
End If
End If
If appMouseLeftDown Then
If drawLastState =4 Then
ElseIf drawLastState =2 Then
ElseIf drawLastState =1 Then
Else
' if mouse is over appDrawing and mouse button was already pressed earlier:
' this is evaluated as a passive situation for the appDrawing !
End If
ElseIf appMouseRightDown Then
If drawLastState =5 Then
ElseIf drawLastState =3 Then
ElseIf drawLastState =1 Then
Else
' if mouse is over appDrawing and mouse button was already pressed earlier:
' this is evaluated as a passive situation for the appDrawing !
End If
Else
If drawLastState =4 Then
ElseIf drawLastState =5 Then
Else
End If
End If
Else
drawCurrentState =0
If drawToolTipShown Then
End If
End If
Else
drawCurrentState =0
If drawToolTipShown Then
End If
End If
If Right$(drawAnimStack, 1) <>Trim$(drawCurrentState) Then
End If
ElseIf drawCurrentState =>15 And drawCurrentState <=19 Then
' 15, 16, 17, 18 19, 20: states of an appDrawing serving as a column of a List line
' (20 : cell without any data)
If appMouseFound =False Then
If p =2 Then
' Mouse is just over appDrawing
' custom mouse pointer for that appDrawing set ?
If drawCustomMouse <>Null Then
Else
End If
If Not(drawToolTipShown) Then
If drawToolTipText <>"" Then
If Not(drawToolTipCreated) Then
End If
If appCustomMouseUsed Then
End If
If appMouseX +offsetX +drawToolTipdrawImgWidth >appWidth Then
Else
End If
If appMouseY +offsetY +drawToolTipdrawImgHeight >appHeight Then
Else
End If
End If
Else
If appCustomMouseUsed Then
End If
If appMouseX +offsetX +drawToolTipdrawImgWidth >appWidth Then
Else
End If
If appMouseY +offsetY +drawToolTipdrawImgHeight >appHeight Then
Else
End If
End If
If drawListlistEnabled And drawListlistMouseSetActive Then
If drawListListSetActiveLineColumn Then
If appActiveList <>drawList Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
If drawList <>Null Then
End If
End If
' the highlighted active line has changed; to update the other appDrawings of the List line
' already in this run through main loop, which run earlier through RefreshState(),
' refresh their state again:
If drawListlistSelection =0 Then
For Local z:Int =0 To drawListlistDisplayedColumns -1
'drawListlistAppDrawingsdrawListLine -1, zRefreshState()
Next
End If
End If
End If
If Not(drawLabelEdited Or drawLabelMultiEdited) Then
If appMouseLeftDown Then
If drawListState =1 Then drawListState =2
Else
If drawListState =0 Then
ElseIf drawListState =2 Then
End If
End If
End If
Else
If drawToolTipShown Then
End If
End If
Else
If drawToolTipShown Then
End If
End If
Else
If drawToolTipShown Then
End If
End If
'-------------------------------------------------------------------------------------------
' secondly evaluate the state
' (while on the visual level an animation of an earlier state still may be running !)
Local curVisible:Int =drawVisible
If drawCurrentState <8 Then
If drawAutoZ =0 Then
If drawZ <0 Then
End If
ElseIf drawY +drawSurOffsetY >appHeight Then
ElseIf drawY +drawSurOffsetY +drawSurHeight <0 Then
End If
If curVisible Then
If drawCurrentState =2 Or drawCurrentState =4 Then
If drawMouseAwareness =1 Or drawMouseAwareness =2 Then
' dragging operations with left mouse button hold
' this may change the focus of an appDrawing,
' but does NOT change appActiveText or appActiveList !
' BUT to an active List keyboard actions are already now not transferred anymore,
' because this transfer depends on the appCurFocus !
If appDrawDragging =Null Then
If drawIsDraggable >2 Then
End If
If drawFocusOrder >0 Then
Else
End If
End If
Else
' button to increase/decrease a Scroll Bars value ?
If drawGuiType =11 Or drawGuiType =111 Then
ElseIf drawGuiType =12 Or drawGuiType =112 Then
ElseIf drawIsWord Then
' if word, also set focus already with starting of text selecting
If drawTextAssignedtxtWordsdrawWordIndexwrdSelectable Then
If drawTextAssignedtxtOrientDrawing <>Null Then
If drawTextAssignedtxtOrientDrawingdrawList =Null Then
Else
End If
If appCurFocus >0 Then
Else
End If
End If
End If
' and set appActiveText
If appActiveText <>drawTextAssigned Then
End If
If Not(appActiveTexttxtHasSelection) Then
If appActiveTexttxtCursorWord =-1 Then
For Local z2:Int =0 To appActiveTexttxtWordCount -1
If appActiveTexttxtWordszwrdEditable And appActiveTexttxtWordszwrdvisible Then
Exit
End If
Next
End If
End If
If appActiveTexttxtOrientDrawing <>Null Then
If drawTextAssignedtxtOrientDrawingdrawList =Null Then
End If
If appActiveList <>appActiveTexttxtOrientDrawingdrawList Then
End If
Else
End If
' calculate cell where mouse is in
While curCell <drawCharCellsLength
If appMouseX <=curLeft Then Exit
Wend
If KeyDown(KEY_LSHIFT) Then
ElseIf KeyDown(KEY_LCONTROL) Then
Else
End If
End If
End If
ElseIf drawCurrentState =3 Or drawCurrentState =5 Then
If drawMouseAwareness =1 Or drawMouseAwareness =3 Then
' dragging operations with right mouse button hold
' this may change the focus of an appDrawing,
' but does NOT change appActiveText or appActiveList !
' BUT to an active List keyboard actions are already now not transferred anymore,
' because this transfer depends on the appCurFocus !
If appDrawDragging =Null Then
If drawIsDraggable >2 Then
End If
If drawFocusOrder >0 Then
Else
End If
End If
End If
ElseIf drawCurrentState =6 Then
' click or doubleclick left
' here also appActiveText and appActiveList may be changed
If drawIsWord Then
Else
' set focus first time here if its not a word or a dragged appDrawing
If (drawGuiType =>10 And drawGuiType <=15) Or (drawGuiType =>110 And drawGuiType <=115) Then
' if it a part of a Scroll Bar serving a List: set focus to the List !
If drawScrollBarscrollsAppListV <>Null Then
If appActiveList <>drawScrollBarscrollsAppListV Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
End If
ElseIf drawScrollBarscrollsAppListH <>Null Then
If appActiveList <>drawScrollBarscrollsAppListH Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
End If
Else
' appCurFocus >0 gets checked below
If appCurFocus =0 Then
If appActiveList <>drawList Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
If drawList <>Null Then
End If
End If
End If
End If
Else
' appCurFocus >0 gets checked below
If appCurFocus =0 Then
If appActiveList <>drawList Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
If drawList <>Null Then
End If
End If
End If
End If
If drawFocusOrder >0 Then
' is an appLabel assigned which becomes editable on click ?
If drawGuiType =6 Then
ElseIf drawGuiType =106 Then
' is an appLabelMulti assigned which becomes editable on click ?
ElseIf drawGuiType =8 Then
ElseIf drawGuiType =108 Then
ElseIf Not(drawLabelEdited Or drawLabelMultiEdited) Then
If appActiveText <>drawTextAssigned Then
End If
If appActiveText <>Null Then
If appActiveTexttxtVisible Then
If Not(appActiveTexttxtHasSelection) Then
If appActiveTexttxtCursorWord =-1 Then
For Local z3:Int =0 To appActiveTexttxtWordCount -1
If appActiveTexttxtWordszwrdEditable And appActiveTexttxtWordszwrdvisible Then
Exit
End If
Next
End If
End If
If appActiveTexttxtOrientDrawing <>Null Then
End If
Else
End If
End If
If appActiveList <>drawList Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
If drawList <>Null Then
End If
End If
End If
Else
End If
End If
If appRunning_ms -appMouseLeftDownTime <=appMouseClickRestTime Then
' doubleclick
' double click on a selectable word ?
If drawIsWord Then
If KeyDown(KEY_LSHIFT) Then
ElseIf KeyDown(KEY_LCONTROL) Then
Else
End If
End If
If drawIsClickable =1 Or drawIsClickable =2 Then
If drawToggle Then
If drawAnimOnMousePressedL >-1 Then
End If
Local maxState2:Int =999999
If drawAnimOnMouseOver >-1 Then
End If
If drawClickState >Min(maxState1, maxState2) Then
End If
End If
If drawGuiType =0 Then
ElseIf drawGuiType <100 Then
ElseIf drawGuiType >100 And appEditMode Then
End If
End If
Else
If drawIsWord Then
If drawTextAssignedtxtMouseSelDone =False Then
If drawWordEditable Then
For Local z4:Int =0 To drawCellDown -1
Next
' display cursor cell even though current clicking on it requires displaying already ?
' because current displaying may be only partially !
End If
Else
End If
End If
If drawIsClickable =1 Or drawIsClickable =2 Then
If drawToggle Then
If drawAnimOnMousePressedL >-1 Then
End If
Local maxState3:Int =999999
If drawAnimOnMouseOver >-1 Then
End If
If drawClickState >Min(maxState1, maxState2) Then
End If
End If
If drawGuiType =0 Then
Else
' here EVENT_GUICLICKEDLEFT() is not raised now
' but after appText editing is done !!!
If drawGuiType =5 Then
Repeat
For Local curLbl2:Int =drawLabelAssignedCount To 1 Step -1
If drawLabelAssignedStatecurLbl -1 =targetState Then
Exit
End If
Next
If Not(success) Then
If targetState =drawCurrentState Then
ElseIf targetState =-1 Then
End If
End If
Until success
ElseIf drawGuiType =6 Then
' see above: click made editable Label edited, does not raise EVENT_CLICK
ElseIf drawGuiType =7 Then
Repeat
For Local curLbl3:Int =drawLabelMultiAssignedCount To 1 Step -1
If drawLabelMultiAssignedStatecurLbl -1 =targetState Then
Exit
End If
Next
If Not(success) Then
If targetState =drawCurrentState Then
ElseIf targetState =-1 Then
End If
End If
Until success
ElseIf drawGuiType =8 Then
' see above: click made editable LabelMulti edited, does not raise EVENT_CLICK
ElseIf drawGuiType <100 Then
' button to set a Scroll Bars value minimal or maximal ?
If drawGuiType =13 Then
ElseIf drawGuiType =14 Then
ElseIf drawGuiType =15 Then
' Scroll bars background
ElseIf drawGuiType =>10 And drawGuiType <=12 Then
' no click event for Scroll Bars button: drag, incr, decr !
Else
End If
End If
End If
If appEditMode Then
If drawGuiType =105 Then
Repeat
For Local curLbl4:Int =drawLabelAssignedCount To 1 Step -1
If drawLabelAssignedStatecurLbl -1 =targetState Then
Exit
End If
Next
If Not(success) Then
If targetState =drawCurrentState Then
ElseIf targetState =-1 Then
End If
End If
Until success
ElseIf drawGuiType =106 Then
' see above: click made editable Label edited, does not raise EVENT_CLICK
ElseIf drawGuiType =107 Then
Repeat
For Local curLbl:Int =drawLabelMultiAssignedCount To 1 Step -1
If drawLabelMultiAssignedStatecurLbl -1 =targetState Then
Exit
End If
Next
If Not(success) Then
If targetState =drawCurrentState Then
ElseIf targetState =-1 Then
End If
End If
Until success
ElseIf drawGuiType =108 Then
' see above: click made editable LabelMulti edited, does not raise EVENT_CLICK
ElseIf drawGuiType >100 Then
' button to set a Scroll Bars value minimal or maximal ?
ElseIf drawGuiType =113 Then
ElseIf drawGuiType =114 Then
ElseIf drawGuiType =115 Then
'Scroll bars background
ElseIf drawGuiType =>110 And drawGuiType <=112 Then
' no click event for Scroll Bars button: drag, incr, decr !
Else
'REMARK or UNREMARK in both case no error under BlitzMax 1.20''''''' 'End If
End If
End If
End If
End If
ElseIf drawCurrentState =7 Then
' single click (only !) right
' set focus first time here if its not a word or a dragged appDrawing
If Not(drawIsWord) Then
If drawFocusOrder >0 Then
Else
End If
If appActiveText <>drawTextAssigned Then
End If
If appActiveText <>Null Then
If appActiveTexttxtVisible Then
If Not(appActiveTexttxtHasSelection) Then
If appActiveTexttxtCursorWord =-1 Then
For Local z7:Int =0 To appActiveTexttxtWordCount -1
If appActiveTexttxtWordszwrdEditable And appActiveTexttxtWordszwrdvisible Then
Exit
End If
Next
End If
End If
If appActiveTexttxtOrientDrawing <>Null Then
End If
Else
End If
End If
If appActiveList <>drawList Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
If drawList <>Null Then
End If
End If
End If
If drawIsClickable =1 Or drawIsClickable =3 Then
If drawGuiType =0 Then
ElseIf drawGuiType <100 Then
ElseIf drawGuiType >100 And appEditMode Then
End If
End If
End If
End If
ElseIf drawCurrentState =>15 And drawCurrentState <=19 Then
' a column of a Lists line
If drawListState =3 Then
' a click happened !
' set focus first time here if its not a word or a dragged appDrawing
If appCurFocus >0 Then
Else
End If
If appActiveList <>drawList Then
If appActiveList <>Null Then
ElseIf appActiveText <>Null Then
End If
If drawList <>Null Then
End If
End If
If drawIsClickable =1 Or drawIsClickable =2 Then
If drawListlistEnabled Then
If Not(drawListlistMouseSetActive) Then
' set active line/column with a click
If drawListListSetActiveLineColumn Then
End If
End If
' listMouseSetActive =TRUE: (only !) EditableOnFocus =TRUE -Label /LabelMulti were set edited
' already with becoming active cell, other Label/appLabelMulti must get a click !
If drawListlistSelection =1 Then
If Not(drawGUIEditOnFocus) Then
If drawGuiType =6 Then
ElseIf drawGuiType =106 Then
' is an appLabelMulti assigned which becomes editable on click ?
ElseIf drawGuiType =8 Then
ElseIf drawGuiType =108 Then
End If
End If
End If
If drawListDataInvertLineSelection Then
' if this an editable appLabel/appLabelMulti, DataInvertLineSelection have returned FALSE !
If appActiveListlistSelection =0 Then
If dataIndex >-1 Then
If Not(appActiveListlist4Edit) Then
If appActiveListdataLinesdataIndexlineIsSelected Then
Else
End If
ElseIf appEditMode And appActiveListlist4Edit Then
If appActiveListdataLinesdataIndexlineIsSelected Then
Else
End If
End If
End If
ElseIf appActiveListlistSelection =1 Then
If dataIndex >-1 Then
If Not(appActiveListlist4Edit) Then
For Local z8:Int =1 To appActiveListdataLinesdataIndexlinesColumnsSelectedLength
If appActiveListdataLinesdataIndexlinesColumnsSelectedz -1 Then
Else
End If
Next
ElseIf appEditMode And appActiveListlist4Edit Then
For Local z9:Int =1 To appActiveListdataLinesdataIndexlinesColumnsSelectedLength
If appActiveListdataLinesdataIndexlinesColumnsSelectedz -1 Then
Else
End If
Next
End If
End If
End If
End If
End If
End If
End If
End If
End Method
'---------------------------------------------------------------------------------------------------------------
End Type