[sword-devel] breakage in verse management at -r2785?

Nic Carter niccarter at mac.com
Thu Mar 21 20:36:01 MST 2013


> which matches the expected results. So Xiphos is getting around calling setIntros(1) by instead disabling auto-normalizing. It's odd to me that you can set a key to a value in the intros while setIntros is false. That doesn't seem like normalizing to me, that seems more like bounds checking, but that's not necessarily a bug in the API, possibly it's a bug in my understanding of intended behavior.

What should the behaviour be when intros are off and you try key->setVerse(0)? should it then go to the last verse in the previous chapter or bump up to verse 1 in the current chapter? If we were already at verse 1 & we decremented the key, it should go to the previous chapter's last verse, but in this case (given it's been set explicitly to verse 0), would it be more correct to bump up to the "first" valid verse in the current chapter (so, verse 0/intro if intros are switched on, or verse 1 if intros are switched off)?

My thought is that it shouldn't allow it to stay at verse 0, but when normalize() is called, it should "fix" it to a valid verse for that versification system (given intros are switched off and there is no such thing as verse 0 in that case)?

But then again, I am probably in the same boat as Greg and maybe I just don't understand the intended behaviour of the API in this situation?

Thanks, ybic
	nic...  :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130322/93e4370e/attachment.html>

More information about the sword-devel mailing list