Changeset 5049


Ignore:
Timestamp:
2003-07-28T11:27:27+12:00 (21 years ago)
Author:
mdewsnip
Message:

Fixed a problem with the library path (exec address) option that was causing a NPE.

Location:
trunk/gli/src/org/greenstone/gatherer/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/NoSettingDialog.java

    r5043 r5049  
    33import java.awt.*;
    44import java.awt.event.*;
     5import java.net.*;
    56import javax.swing.*;
    67import org.greenstone.gatherer.Configuration;
     
    104105        result = JOptionPane.OK_OPTION;
    105106        // Store the value of the property
    106         Gatherer.config.setString("general.exec_address", true, property_field.getText());
     107        String property_value = property_field.getText();
     108
     109        // Store the value of the property
     110        if (!property_value.equals("")) {
     111        try {
     112            Gatherer.config.exec_address = new URL(property_value);
     113        }
     114        catch (MalformedURLException error) {
     115            ///ystem.err.println("Error: Bad address: " + property_value);
     116        }
     117        }
     118        Gatherer.config.setString("general.exec_address", true, property_value);
    107119    }
    108120    // Store the state of the show message checkbox.
  • trunk/gli/src/org/greenstone/gatherer/gui/PreviewPane.java

    r4675 r5049  
    9696        view.showHTMLDocument(BLANK_PAGE);
    9797    }
    98     if (ready) {
     98    if (ready && Gatherer.config.exec_address != null) {
    9999        // reload the home page for the current collection
    100100        try {
Note: See TracChangeset for help on using the changeset viewer.