[sword-devel] broken ant script in jsword

Jerry Kreps sword-devel@crosswire.org
Mon, 24 Dec 2001 15:03:19 -0600


On Monday 24 December 2001 13:11, you wrote:
> All,
>
> I just did a fresh checkout of the jsword project, and now it won't
> build.  It gets hung up when compiling the sword.DisplayConf class
> with the following output.
>
> compile:
>     [javac] Compiling 21 source files to
> D:\home\bobby\sandbox\jsword\btree
>     [javac]
> D:\home\bobby\sandbox\jsword\src\sword\DisplayConf.java:25: cannot
> r
> esolve symbol
>     [javac] symbol  : variable sections
>     [javac] location: class org.crosswire.sword.mgr.SWConfig
>     [javac]           HashMapIterator section =
> (HashMapIterator)conf.config.sec
> tions.start();
>
> [javac]
> ^
>     [javac] 1 error
>
> Any one have a clue what's going on here?  I've taken a stroll
> through the SWConfig.java file, and there's no mention of a member
> variable called 'sections'.
>
> I'm confused because this used to compile correctly.  At least it
> did when I first created the build.xml file for ant.  Does anyone
> have any idea about what might have changed (and how to undo that
> change)?
>
> Thanks,
>
> Bobby

Don't know about java script but here is the C++ code from swconfig.h:

/** The class to read and save settings using a file on disk.
*
*/
class SWDLLEXPORT SWConfig
{
private:
  char getline (FILE * fp, string & line);
public:
  /** The filename used by this SWConfig object
  *
  */
  string filename;
  /** Map of available sections
  * The map of available sections.
  */
  SectionMap Sections;

  /** Constructor of SWConfig
  * @param ifilename The file, which should be used for this config.
  */
  SWConfig (const char *ifilename);
  virtual ~ SWConfig ();

  /** Load from disk
  * Load the contzent from disk.
  */
  virtual void Load ();

  /** Save to disk
  * Save the content of this config object to disk.
  */
  virtual void Save ();

  /** Merges the values of addFrom
  * @param The config which values should be merged to this config 
object. Already existing values will be overwritten.
  */
  virtual SWConfig & operator += (SWConfig & addFrom);

  /** Get a section
  * This is an easy way to get and store config values.
  * The following will work:\n
  *
  * @code
  * SWConfig config("/home/user/.setttings");
  * config["Colors"]["Background"] = "red";
  * @endcode
  */
  virtual ConfigEntMap & operator [] (const char *section);
};

#endif