Elgin1 / Java-Access-Bridge-for-AHK

Other
21 stars 3 forks source link

JavaAccessBridge: Break/Continue must be enclosed by a Loop #2

Closed Stevoisiak closed 7 years ago

Stevoisiak commented 7 years ago

Attempting to run or include JavaAccessBridge.ahk in AutoHotkey v1.1.26.01 fails with the error "Break/Continue must be enclosed by a Loop."

The error happens in GetAccessibleTableRowSelections() on line 1991

This issue was introduced with https://github.com/Elgin1/Java-Access-Bridge-for-AHK/commit/f1486550d4a04b2f128bef13448184a860dcbe1a (added accessible table functions).

---------------------------
JavaAccessBridge.ahk
---------------------------
Error:  Break/Continue must be enclosed by a Loop.

    Line#
    1905: Loop,%retchild%
    1906: {
    1907: Children[++cnt]:=Numget(&TempChildren, JABVariables["acSize"]*(A_Index), JABVariables["acType"])  
    1908: }
    1909: StartChild := StartChild+retchild
    1910: }
    1911: Else
--->    1911: Break
    1912: }
    1913: Return,Children
    1914: }
    1917: {
    1919: if (JABVariables["JABInitialised"])  
    1920: {
    1921: cnt := DllCall(JABVariables["JAB_DLLVersion"] "\getAccessibleTableColumnSelectionCount", "Int", vmID, JABVariables["acType"], ac, "Cdecl Int")

The program will exit.
Elgin1 commented 7 years ago

fixed

Stevoisiak commented 7 years ago

@Elgin1 This issue still occurs in GetAccessibleTableColumnSelections() on line 1944.

https://github.com/Elgin1/Java-Access-Bridge-for-AHK/blob/e42c659dd824ad592dacfe60c750d2606cf7790b/JavaAccessBridge.ahk#L1934-L1944

Stevoisiak commented 7 years ago

@Elgin1 Can this issue be reopened? It is still occurring after https://github.com/Elgin1/Java-Access-Bridge-for-AHK/commit/abc06aaa3c0c09a139b6b556e348f7ead8c87970