[Gambas-user] Problem with OPTIONAL method declaration
Benoît Minisini
gambas at ...1...
Wed Feb 4 15:34:44 CET 2015
Le 04/02/2015 15:18, bill-lancaster a écrit :
> I have a form with:-
>
> Public Sub _new(Optional iNr As Integer)
> iStatementNr = iNr
> End
>
> When the form is opened with:-
>
> Dim hForm As FFormName
> hForm = New FFormName1019)
> hForm.ShowModal
>
> I get this error message - "Type mismatch: wanted control, got integer
> instead"
>
> Wheras just:-
> FFormName.ShowModal()
> Works OK
>
> Any help would be appreciated
> Gambas3.5.3
>
>
Form constructor already takes an optional argument, its parent.
You must do: New FFormName(Null, 1019)
Regards,
--
Benoît Minisini
More information about the User
mailing list