[sword-devel] incorrect key normalization?

Troy A. Griffitts scribe at crosswire.org
Tue Nov 24 05:14:41 MST 2009


Dear Martin,

It should work as you suggest if headings is turned on for the VerseKey.  Well, almost as you suggest. You would get the pre-chapter material. Though the key would not normalize to gen.2.1, but instead gen.2.0.

It does not vary based on the module contents. Normalization happens mostly for programmatic navigation convenience, a crude e.g., but hopefully will show when it might be useful.

VerseKey vk = userInput;
vk.Verse(vk.Verse() - 3);
for (int i = 0; i < 7; i++) {
  vk++;
  // display something
}

Think struct tm or java.util.Calendar.

Let me know if you find that turning on headings doesn't work to show chapter intro material, as you describe.

Troy


Martin Gruner <mg.pub at gmx.net> wrote:

>Hi Troy, hi Sword developers,
>
>I just noticed through a bug report a surprising feature of Sword.
>
>martin at workstation:/home/dev/sword/examples/cmdline$ ./lookup KJV "Gen 2:0"
>==Raw=Entry===============                                                 
>Genesis 1:31:                                                              
>....
>
>It normalizes Gen 2:0 to Gen 1:31. Is that the desired behaviour? It seems to 
>me that Gen 2:1 would be more intuitive here, given that it can contain pre-
>chapter material. 
>
>What do you think?
>
>Regards, mg
>
>-- 
>
>Bauplan des Lebens - längst im Gen entdeckt!
>Die Wissenschaft ist stolz: Sie hat's gecheckt.
>Nun ist der Bauplan als Beweis beliebt,
>dass es den Architekten gar nicht gibt.
>
>Wolf Rahn
>
>_______________________________________________
>sword-devel mailing list: sword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page


More information about the sword-devel mailing list