[sword-devel] module making questions

Troy A. Griffitts sword-devel@crosswire.org
Tue, 10 Oct 2000 17:35:07 -0700

> Question 1:  Sometimes I will want to add text to the
> module/verse/book/chapter intro entries.  How do I do so?  I thought they
> might be chapter/verse 0--like Mat 0:0 might be the intro for the NT or
> Gen 1:0 might be the intro to Genesis chapter 1--but none of those seem to
> be the case from my experiments.  Is there a nice way to access them
> through the API?

You might need to turn Headings on and AutoNormalize off.


> Question 2:  Many lengthy commentaries have a single entry to discuss
> multiple verses, so the .vss entries for the verses contain the same
> (long)offset, (short)size struct.  Is there a method for copying these, or
> just reading/writing them, through the API?

Here is a copy of the write interfaces from swmodule.h:

     virtual SWModule &operator <<(const char *);  // Modify current
module entry
     virtual SWModule &operator <<(const SWKey *); // Link current
module entry to other module entry
     virtual void Delete();                        // Delete current
module entry

If I remember correctly, I think...

module.SetKey("James 1:19");
module << "Commentary for James 1:19-21";

module++; module << &((VerseKey) "James 1:19");
module++; module << &((VerseKey) "James 1:19");

...would do what you are asking about.

> If you can help me solve these two problems, I promise I'll not only
> contribute the utilities back to the CVS, but I'll deliver MHC
> (complete) and Calvin's Commentaries by the end of the week. :)

Whoo hooooo!!! :)