Error trying to start VASSAL Editor in Eclipse

Ubuntu 12.04 x64
Version: Kepler Service Release 1
Build id: 20130911-2042

I have a launch configuration which uses this main class:
VASSAL.launch.Editor

The arguments for my run configuration are:
–edit “/home/robert/Vassal Modules/WARPWAR.vmod”
and that file does exist at that location and it’s owned by my user ‘robert’.

When I run the Run Configuration, the VASSAL bug collector UI appears. When I look at the error log, it looks like thr code thinks there is someting wrong with the .vmod file.
However I noticed something really odd in the log, that the code is trying to load the ZapWars Module instead of the module I thought I was asking it to load.

error log attached.
Any thoughts?
Thanks,
Rob

Thus spake nosmadar2014:

Ubuntu 12.04 x64
Version: Kepler Service Release 1
Build id: 20130911-2042

I have a launch configuration which uses this main class:
VASSAL.launch.Editor

The arguments for my run configuration are:
–edit “/home/robert/Vassal Modules/WARPWAR.vmod”
and that file does exist at that location and it’s owned by my user
‘robert’.

Why are you trying to launch the editor that way?


J.


At this point I honestly can’t remember. I think I tried this back in early April, when I had just gotten the VASSAL source setup in Eclipse and was trying to figure out how any code I wrote would be executed. And I think I saw a forum post about running VASSAL in debug mode, and that maybe where I got the idea that starting the Editor directly would be useful.
Currenty I can get the Module Manager running in stand alone mode, so I can open and edit modules. And as long as the Eclipse debugger works in that context, then I’ll be fine.

Rob
:blush:

Thus spake nosmadar2014:


At this point I honestly can’t remember. I think I tried this back in
early April, when I had just gotten the VASSAL source setup in Eclipse
and was trying to figure out how any code I wrote would be executed.
And I think I saw a forum post about running VASSAL in debug mode, and
that maybe where I got the idea that starting the Editor directly would
be useful.
Currenty I can get the Module Manager running in stand alone mode, so I
can open and edit modules. And as long as the Eclipse debugger works in
that context, then I’ll be fine.

Maybe we should back up. What are you trying to accomplish with the
command-line arguments which aren’t working?


J.

Thanks but it’s Ok, I figured out that I don’'t need to start the Editor by it’s self.

Overall, what I’m trying to do is create a custom class for a module which adds a couple of buttons to the menu. The end gooal is for the buttons to launch some Python code (via Jython). [ Long Story :slight_smile: ]
I’ve already moved on to some new problems trying to get the custom class to load in VASSAL.tools.DataArchive which I’ve kludged around for now.

Thanks,
Rob

Actually I have one (sort of) related question.
So far I’ve been following the programming tutorial with mixed success. I’ve gotten to the point where VASSAL actually does import my class from the .vmod file and tries to figure out what to do with the custom things in it by:

  • Starting VASSAL, opening my modified .vmod file
  • right click on the module and choosing Edit
  • right click on [Global Options] and choosing import class – this is where VASSAL.tools.ConfigureTree.importConfigurable opens a JOptionPane. That result is returned to buildImportAction but the net result is that I’m getting a perhaps reasonable error stating that “Error adding WarpWarMods to Global Options. VASSAL.build.module.GlobalOptions cannot be cast to VASSAL.build.GameModule.”

My question is: Am I using the correct stesp to import my class? There is a File / Import menu entry in the Module Manager window but that seesm to be for entire moduels and when I’ve tried to use it, says that my .vmod file is not in the correct format.

Thus spake nosmadar2014:

Actually I have one (sort of) related question.
So far I’ve been following the programming tutorial with mixed success.
I’ve gotten to the point where VASSAL actually does import my class from
the .vmod file and tries to figure out what to do with the custom things
in it by:

  • Starting VASSAL, opening my modified .vmod file
  • right click on the module and choosing Edit
  • right click on [Global Options] and choosing import class – this is
    where VASSAL.tools.ConfigureTree.importConfigurable opens a
    JOptionPane. That result is returned to buildImportAction but the net
    result is that I’m getting a perhaps reasonable error stating that
    “Error adding WarpWarMods to Global Options.
    VASSAL.build.module.GlobalOptions cannot be cast to
    VASSAL.build.GameModule.”

You need to import your class under something in the tree which could
act as a parent of instances of your class. (If that doesn’t make sense,
maybe post your module so we can see it.)

My question is: Am I using the correct stesp to import my class? There
is a File / Import menu entry in the Module Manager window but that
seesm to be for entire moduels and when I’ve tried to use it, says that
my .vmod file is not in the correct format.

Import in the MM is for converting non-VASSAL modules to VASSAL.


J.

Makes perfect sense.
Thanks!