Why does this not generate a compiler error in VO:
oFTP := FtpAX{cFtp, dwPoort, dwTimeout, cRemoteDir, cUser, cPW, TRUE, FALSE, FALSE, FALSE,(one parameter false missing)}
METHOD Init(cHost AS STRING, dwFTPport AS DWORD, dwFTPtimeout AS DWORD, cRDir AS STRING, cUser AS STRING, cPass AS STRING, lPassive AS LOGIC, lImplicitSSLTLS AS LOGIC, lSSL AS LOGIC, lTLS AS LOGIC, lQuiet AS LOGIC) AS OBJECT PASCAL CLASS FtpAX
The init is strong typed, declared in the class, but the missing parameter does not give a compiler error in VO.
Dick
Strong typed init, no compiler error on missing parameters?
Strong typed init, no compiler error on missing parameters?
Dick,
VO does not support strongly typed constructors.
The compiler converts all class creations into a call to CreateInstance(....)
Robert
VO does not support strongly typed constructors.
The compiler converts all class creations into a call to CreateInstance(....)
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Strong typed init, no compiler error on missing parameters?
Hello Robert,
Ah! I thought I knew this but I also though that you just couldn't create strong typed init's but it compiled fine. So even after all these years VO still surprises us from time to time.
Dick
Ah! I thought I knew this but I also though that you just couldn't create strong typed init's but it compiled fine. So even after all these years VO still surprises us from time to time.
Dick
Strong typed init, no compiler error on missing parameters?
Dick,
You will see the same problem when you strongly type a method and call it late bound. In that case you will also not be notified of missing parameters.
Robert
You will see the same problem when you strongly type a method and call it late bound. In that case you will also not be notified of missing parameters.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu