Adding a Custom Class

So, going forward you don’t need to include Buttons.java in the folder. It doesn’t hurt, but won’t achieve anything either. But since you did, I noticed that it contains some additional class definitions. I believe when you compile this file, there will be other class files generated - you probably need to include these files in that folder as well. Any file that starts with Buttons and ends in .class; I think there should be three of them besides the one already included.

Thanks for this. I appreciate your help.

Added all the versions of Buttons to the .vmod file with 7-Zip. No change. Same error.

When I drag and drop Buttons into the .vmod file, are there any properties or settings that might be getting in the way?

Could you upload that version of the vmod to dropbox as well? I tried compiling the java file here and adding the class files to the module, and was able to add WingLeader.Buttons successfully (I don’t think the class is working quite right yet, but I was able to add the custom class and it did something to the toolbar).

There were five total class files in the WingLeader folder:
Buttons$1.class
Buttons$2.class
Buttons$HideMarkers.class
Buttons$HideTargets.class
Buttons.class

Here is the link to the .vmod with all of the different Buttons classes included. dropbox.com/s/s84s7mjo9xese … .vmod?dl=0

I am glad that you could add the custom class. I have been trying to add it to the Main Map window. Is that where I should be adding it?

You are right it is probably not working perfectly yet - and indeed it is supposed to add two buttons to the toolbar.

Thanks!

Maybe that’s the difference - I was adding it to the root node. That works without an error, but if I try to add it to the Main Map node instead, I get a casting error. Either way, it appears the class is at least loading correctly.

[attachment=2]Screen Shot 2019-11-27 at 21.05.00.png[/attachment]
[attachment=1]Screen Shot 2019-11-27 at 21.05.10.png[/attachment]
[attachment=0]Screen Shot 2019-11-27 at 21.05.14.png[/attachment]

OK. When I add it to the root mode it works!! Damn, I am sure that I had tried that before. Perhaps that was before I added all the versions of Buttons classes. Anyway, thanks so much for sticking with me on this. Now, I just have to get the class doing what it is supposed to do.

A million thanks.

Doug