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:Usersstefan.ungemachsourcereposXSharpXBasislib_(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...)?
Method calls in Codeblocks
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Method calls in Codeblocks
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.
.
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.
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Method calls in Codeblocks
Thank you - that was missing in one of my projects. Still need more routine...