xsharp.eu • Calling convention of overriden methods
Page 1 of 1

Calling convention of overriden methods

Posted: Mon Nov 18, 2024 2:31 pm
by baramuse
Hi,

I'm trying to target Vo as dialect, code is Vulcan.net for now
But I have two last errors I can't figure out :

Code: Select all

Error	XS9041	Override of virtual method 'SetFilter' in child class has STRICT calling convention but overridden method in parent class is CLIPPER.	Locasyst.WebServices.Lib.XSharp	Serveurs Definitions.prg	618	
and that's the code :

Code: Select all

  PUBLIC METHOD SetFilter( cFiltre AS USUAL ) AS USUAL // AS STRING ) AS LOGIC
  // Interception du filtre pour gérer le filtre FTS, "Contains" n'est pas trouvé par la MacroCompiler Vulcan
  LOCAL lOk       AS LOGIC
  // LOCAL nHnd      AS IntPtr
  LOCAL pszFilter AS PSZ

    IF SELF:IsAds .AND. cFiltre = "Contains( *, '"                  // Filtre FTS
      // nHnd := SELF:Info( DBI_GET_ACE_TABLE_HANDLE2 )             // Handle ADS de la table
      pszFilter := String2Psz( cFiltre )
      AdsSetFilter( SELF:AdsHandle, pszFilter )  // nHnd
      lOk := TRUE
    ELSE
      lOk := SUPER:SetFilter(cFiltre)
    ENDIF

  RETURN lOk
what am I missing ?

Re: Calling convention of overriden methods

Posted: Mon Nov 18, 2024 2:44 pm
by robert
Basile,
If the class is a DbServer subclass then it has to be:

Code: Select all

PUBLIC METHOD SetFilter( cFiltre  ) AS USUAL 
Robert

Re: Calling convention of overriden methods

Posted: Mon Nov 18, 2024 2:55 pm
by baramuse
robert wrote: Mon Nov 18, 2024 2:44 pm Basile,
If the class is a DbServer subclass then it has to be:

Code: Select all

PUBLIC METHOD SetFilter( cFiltre  ) AS USUAL 
Robert
I tried that but then it's complaining about not having a type :
Severity Code Description Project File Line Suppression State
Error XS1031 Type expected Locasyst.WebServices.Lib.XSharp Serveurs Definitions.prg 618

Re: Calling convention of overriden methods

Posted: Mon Nov 18, 2024 10:28 pm
by robert
Basile,

Try this then

PUBLIC METHOD SetFilter( cFiltre ) AS USUAL CLIPPER

Robert