• xHarbour.com version and HWGUI source

    From Gary Williams@21:1/5 to All on Thu Dec 23 10:08:36 2021
    HWGUI source does not compile cleanly under the last release of xHarbour.com base release, from what I can tell partly due to code blocks in the LOCAL declaration. Example below

    From Editor.prg/Function EditMethod

    Local bKeyDown := {|o,nKey|
    IF nKey == VK_ESCAPE .AND. oDlg != Nil
    oDlg := Nil
    o:oParent:Close()
    Return -1
    ENDIF
    Return -1
    }

    Once converted to

    Local bKeyDown := {|o,nKey| bKeyDownF( o, nKey )}

    With all the codeblock's code moved to a new function, it seems to compile and run, is there a flag/include I am missing on xharbour.com to allow this to compile?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Thu Dec 23 19:35:11 2021
    Il 23/12/2021 19:08, Gary Williams ha scritto:

    HWGUI source does not compile cleanly under the last release of xHarbour.com base release, from what I can tell partly due to code blocks in the LOCAL declaration. Example below

    From Editor.prg/Function EditMethod

    Local bKeyDown := {|o,nKey|
    IF nKey == VK_ESCAPE .AND. oDlg != Nil
    oDlg := Nil
    o:oParent:Close()
    Return -1
    ENDIF
    Return -1
    }

    Once converted to

    Local bKeyDown := {|o,nKey| bKeyDownF( o, nKey )}

    With all the codeblock's code moved to a new function, it seems to compile and run, is there a flag/include I am missing on xharbour.com to allow this to compile?

    Try using < and > instead ok { and } as codeblock delimeters:

    Local bKeyDown := <|o,nKey|
    IF nKey == VK_ESCAPE .AND. oDlg != Nil
    oDlg := Nil
    o:oParent:Close()
    Return -1
    ENDIF
    Return -1
    >

    EMG

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Williams@21:1/5 to All on Thu Dec 23 11:32:28 2021
    Thanks that did the trick, never been exposed to that until now, been using xharbour, and clipper since it was released, but still learning it seems.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)