[sword-devel] osis2mod bug
tom.cornell at gmail.com
Tue Dec 2 15:51:05 MST 2008
On Tue, Dec 2, 2008 at 2:24 PM, DM Smith <dmsmith555 at yahoo.com> wrote:
> I figured out a work around.
> On Dec 2, 2008, at 11:32 AM, DM Smith wrote:
>> I found the osis2mod bug and I need a bit of help. I guess I don't
>> understand the SWORD engine all that well:)
>> In an OSIS document we might have an osisID="John.2"
>> When I do the following:
>> VerseKey currentVerse;
>> currentVerse = token.getAttribute("osisID");
>> cout << currentVerse << endl;
>> I get the following:
>> John 1:51
>> I expected
>> John 2:0
>> How do I accomplish what I want?
> I figured out a work around
> VerseKey t;
> t = token.getAttribute("osisID");
> currentVerse = t;
> For the life of me, I can't figure out why this works, but the other
> does not.
> In Him,
The difference might be that t is a freshly-initialized VerseKey, with
no history. But currentVerse, which is a global variable, might be
carrying around bits of state that are different from the brand new t.
I don't know the code, so I don't know either whether (a) currentVerse
could conceivably be in a non-initialized state at this point or (b)
if there is anything in a VerseKey object that you could set that
would make it interpret the 0 verse number in this way. But that is a
difference between the two versions, for what it's worth.
More information about the sword-devel