This forum is meant for questions and discussions about the X# language and tools
baramuse
Posts: 98 Joined: Tue Nov 29, 2022 8:31 am
Location: France
Post
by baramuse » Mon Nov 18, 2024 2:31 pm
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 ?
robert
Posts: 4554 Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands
Post
by robert » 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
baramuse
Posts: 98 Joined: Tue Nov 29, 2022 8:31 am
Location: France
Post
by baramuse » Mon Nov 18, 2024 2:55 pm
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
robert
Posts: 4554 Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands
Post
by robert » Mon Nov 18, 2024 10:28 pm
Basile,
Try this then
PUBLIC METHOD SetFilter( cFiltre ) AS USUAL CLIPPER
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
LeoFreskos
Posts: 1 Joined: Mon Nov 18, 2024 8:02 am
Location: USA
Post
by LeoFreskos » Wed Nov 27, 2024 4:47 pm
Of course its possible that this was based on a different version of the .lib file which does use the C calling convention. If not, you should fold this change in.