warnings in Servoy 6.0.5.

Hi All ,

I am facing following warnings in Servoy 6.0.5 .

Code :
var ftp = new Packages.org.apache.commons.net.ftp.FTPClient();
ftp.connect(globals.CDN_UPLOAD_HOST);

warning : The function connect() is undefined in this script.

How Can I remove this warning ? . Thanks in advance . Waiting for your feeback.

Thanks,
Ashutos.

Maybe something like this will work?

/** @type {org.apache.commons.net.ftp.FTPClient} */

Hi Kaptan,

Thanks for your reply . Sorry this is not working .

That’s too bad, I thought that it will work because I have that kind of type declaration working with another packages. (javax.swing.plaf.FontUIResource)

Wouldn’t this

/** @type {Packages.org.apache.commons.net.ftp.FTPClient} */

be logical? This is an external library, so it needs Packages.

Hi Patrick,

Thanks for your reply . This is not working.

Yes it does. I tried myself with that exact package. Code completion on “ftp” shows me all available methods of FTPClient. You still get a warning, but that complains of the argument that you provide and not that “connect” is unknown.

If you do this:

var ftp = new Packages.org.apache.commons.net.ftp.FTPClient();

then you shouldn’t need to add a cast,
ftp. should give you all the code completion of that FTPClient