Home >> Forums >> Creating new actions - Broken GUI

Creating new actions - Broken GUI


I'm doing some work on Ichthyop internals and I need to add new actions (Vertical Dispersion, Migration...)
What I'm doing is:
- Coding the action, taking another one as template.
- Copying and pasting the file.
- Compiling using JDK1.8
- Edit the .xml configuration file, so my custom action can read parameters from there.
But... this seems to break the GUI! When I click on the JTree (Say Advanced -> Transport -> Advection), the right panel does not update and remains blank.
Hmm... What am I doing wrong? Could someone give me some hints?

Ichthyop version: 
Ichthyop 3.3alpha
Java version: 
Java SE 8
Operating system: 

This is interesting... On JConfigurationPanel.java there is:

private class ShowConfigEditorsTask extends Task {
protected Object doInBackground() {
// Update configuration panel

If I add some code for debug info:

protected void failed(Throwable c) {
    System.out.println("Config panel update failed: " + (c==null ? null : c.getMessage()));

I get:

Config panel update failed: Could not initialize class org.previmer.ichthyop.Population

What does Population.java have to do with the User Interface? :/

Oh, I see... I was trying to add a GUI option for enabling and disabling the multithreading, as I intend to run Ichthyop on a supercomputing cluster. In Population.java, the line:

private final boolean MULTITHREAD = Boolean.valueOf(getSimulationManager().getParameterManager().getParameter("app.misc","enable_multithreading"));

was driving Ichthyop a bit crazy.