Just to make sure what we are talking about: The only warning I’ve ever seen is the one I get when the module has started. See attached. I check the “Don’t show this again” box, hit “OK” and start playing as normally.The modules show no other signs of not working well. I don’t get warnings during play and obviously not in the error log either.
Yes, that’s the message I’d expect to see if you’re using GameModule.getFrame() in custom code.
3.4.2 is from around the time when we added that message dialog. Shortly thereafter we started writing additional information to the errorLog which is useful for making the necessary changes. You can find that information in the errorLog in 3.5.8.
OK, I have upgraded to 3.5.8. Message still comes up. Module still seems to work and here is the Error Log:
VASSAL.launch.ModuleManager - Manager
2021-08-02 21:28:27,001 [4316-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file C:\Roar\VASSAL\VUF\Moduletest Campaign\Up Front Campaign Extended.vmod
2021-08-02 21:28:27,371 [4316-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2021-08-02 21:28:27,371 [4316-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module Up Front Campaign Extended
2021-08-02 21:28:27,371 [4316-SwingWorker-pool-2-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\VASSAL-3.5.8\jre\bin\java -Xms512M -Xmx512M -Duser.home=C:\Users\Roar -Duser.dir=C:\Program Files\VASSAL-3.5.8 -cp lib\Vengine.jar VASSAL.launch.Player --load – C:\Roar\VASSAL\VUF\Moduletest Campaign\Up Front Campaign Extended.vmod
2021-08-02 21:28:28,343 [10340-main] INFO VASSAL.launch.StartUp - Starting
2021-08-02 21:28:28,359 [10340-main] INFO VASSAL.launch.StartUp - OS Windows 10 10.0
2021-08-02 21:28:28,359 [10340-main] INFO VASSAL.launch.StartUp - Java version 16
2021-08-02 21:28:28,359 [10340-main] INFO VASSAL.launch.StartUp - VASSAL version 3.5.8
2021-08-02 21:28:28,359 [10340-main] INFO VASSAL.launch.Launcher - Player
2021-08-02 21:28:31,939 [10340-AWT-EventQueue-0] WARN VASSAL.tools.ProblemDialog - Deprecated VASSAL function VASSAL.build.GameModule.getFrame called from custom code method UpFront.Messenger.addTo. This VASSAL method is scheduled to be removed after 6-Aug-2021.
2021-08-02 21:28:31,988 [10340-AWT-EventQueue-0] INFO VASSAL.build.GameModule - Up Front Campaign Extended version 1.1
What this is telling you is that UpFront.Messenger.addTo() is calling VASSAL.build.GameModule.getFrame(), which we’re about to remove. Assuming that we do that, this module won’t load in 3.6.0 or later.
The method call to replace VASSAL.build.GameModule.getFrame() is VASSAL.build.GameModule.getPlayerWindow().
Just to be clear that custom code, courtesy Brent, came from my original Up Front module that was created with Vassal 1.2
The fact its still worked this long is remarkable
Yes, all my various UF modules have sprung out from Tim’s original one. I’ve just modified a few things and added more stuff. Tim’s module fits my bill perfectly and I can easily expand it to my own needs.
I understand that the way to fix this is to: replace VASSAL.build.GameModule.getFrame() with VASSAL.build.GameModule.getPlayerWindow()
Case is, as I have tried to explain earlier. I do not have the faintest idea HOW and WHERE to do this . Do I do it in the module editor? Do I somehow open the module in Java (which I neither have any idea how to do)?
Is it just a matter of replacing the text: VASSAL.build.GameModule.getFrame()
with the text VASSAL.build.GameModule.getPlayerWindow() in some program???
No you have to edit the custom code in the back end to point to what Joel showed you. This is not a Vassal editor thing. It is a real programming thing. If you know Java / Github / some other weird stuff like eclipse (I think thats dead now), you know what to do
I decided to have a go with Flint’s files once again. I did the whole exercise again. Cracked open a module, exchanged the relevant files for the ones he made for me, zipped it, renammed to .vmod and opened in 3.5.8.
No warning and no custom code messages in the error log!!!
I don’t know why it worked now and not before, but if I should guess, I probably messed something up the first time around. Perhaps I overlooked one file to be removed or something like that.
Sorry for taking up your time once again with this when the first solution was actually OK! And thank you so much for trying to help me out.
And a special thanks to Flint who did all the work with the replacement files!
Isn’t that what Flint did? I received new .class files from him (about a year ago). And when I now replaced the old .class files with the ones from Flint (obviously I did it correctly this time), the module starts without showing the warning message at startup and there are no more depreciation messages in the error log.
So, to me it seems I have already been helped. I just messed up the first time I used the help.