XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

[VFP] Missing set_vfpClick(System.String) method

Open FabForay opened this issue 10 months ago • 2 comments

The follow code : SELF:Command2 := XSharp.VFP.UI.CommandButton{} SELF:Command2:Text := "Press Me" SELF:Command2:Name := "Command2" SELF:Command2:Location := System.Drawing.Point{24,48} SELF:Command2:Size := System.Drawing.Size{84, 25} SELF:Command2:vfpClick := "Command2_Click"

Will crash with :

System.MissingMethodException HResult=0x80131513 Message=Méthode introuvable : 'Void XSharp.VFP.UI.CommandButton.set_vfpClick(System.String)'. Source=SimpleDialogApp StackTrace: at form1.InitializeComponent() in C:\Users\fabri\OneDrive\Fabrice\VFPXporter\SimpleDialog\Forms\form1_form1.designer.prg:line 98 at form1..ctor(__Usual[] Xs$Args) in C:\Users\fabri\OneDrive\Fabrice\VFPXporter\SimpleDialog\Forms\form1_form1.prg:line 25

The code has been generated by VFPXPorter.

FabForay avatar Feb 22 '25 11:02 FabForay

The strings around the method name should be removed,

RobertvanderHulst avatar Feb 22 '25 14:02 RobertvanderHulst

No, the method name is passed as string on purpose. I think that I have discovered the trouble : In XSharp.VFP.UI, the SetClick is written with a capital "L"... SetCLick, and the library is compiled with Case-sensitivity, but my inside code (in a .xh file to be included in all needed files) I'm using a lowercase "l" :(.

fforay avatar Feb 22 '25 16:02 fforay