[sword-devel] module making questions

Chris Little sword-devel@crosswire.org
Sat, 14 Oct 2000 17:11:16 -0700 (PDT)


On Tue, 10 Oct 2000, Troy A. Griffitts wrote:

> > 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.
> 
> vkey->Headings(1);
> vkey->AutoNormalize(0);

I got the suggestions you gave for solving my second problem to work
correctly, but I'm still having problems with this first problem.  The
problem is that I don't see where I have any VerseKey objects in use
here.  I'm using a RawText class for input, but that seems only to contain
SWKeys, not VerseKeys, so there's no Headings/AutoNormalize function.

I tried using
((VerseKey)module.Key()).Headings(1);
((VerseKey)module.Key()).AutoNormalize(0);
to access the SWKey inside the module and treat it as a VerseKey but it
doesn't want to work that way.  Also, I tried using the SWModule's
decrement operator to go from 1:1 to the introductions, and that also
failed to work.

Do you have any other ideas that I could try?  I'm tempted to just ignore
the API and write to the files manually, but would still like to avoid
that. :)


Thanks,
Chris Little