Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Method calls in Codeblocks 27 Feb 2023 21:20 #25412

  • stefan.ungemach
  • stefan.ungemach's Avatar
  • Topic Author


  • Posts: 14
  • I hope that this is a trivial problem:

    I declare a simple codeblock like this

    aInfo[2] := {#PERSJAHR, { { {|oSrv| oSrv:FG( #PZZADNR ) }, 1, {|Jahr, AGS, PK| PK }, .f. }}}

    which will receive a class instance that has a FG method. However, the compiler throws

    Fehler XS1061 'usual' does not contain a definition for 'FG' and no accessible extension method 'FG' accepting a first argument of type 'usual' could be found (are you missing a using directive or an assembly reference?) lib_(F9 generiert)_KOBIncludes C:\Users\stefan.ungemach\source\repos\XSharp\XBasis\lib_(F8 generiert)_KOBIncludes\_PK.PRG 19

    From all I know this should work and I have other places in the code where this works. What am I missing (an include, a USING-statement...)?

    Please Log in or Create an account to join the conversation.

    Method calls in Codeblocks 27 Feb 2023 21:34 #25413

    • Chris
    • Chris's Avatar


  • Posts: 3981
  • Hi Stefan,

    Yes, it is trivial! You just need to enable the option to allow late binding in the project options window, and it should compile fine.

    .
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Method calls in Codeblocks 27 Feb 2023 21:53 #25415

    • stefan.ungemach
    • stefan.ungemach's Avatar
    • Topic Author


  • Posts: 14
  • Thank you - that was missing in one of my projects. Still need more routine... ;)

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1