<html><head></head><body>It should actually be much simpler than all this.  There actually should be a very old option called skipConsecutiveLinked on SWModule. If this is true and you ++ a module, you should get the next non-linked verse.<br><br><div class="gmail_quote">On November 15, 2018 7:05:06 AM MST, Greg Hellings &lt;greg.hellings@gmail.com&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">In the olden days this was detected by incrementing to the next verse, calling renderText(), and doing a string comparison between it and the previous verse to determine if they were the same.<div><br></div><div>Nowadays there is a method on SWModule named "isLinked(SWKey*, SWKey*)". It has slightly more complicated logic (it doesn't render out the text, so it's not susceptible to differences in filter and option settings, etc) and should be more efficient than just a string comparison. You can pass it two verse keys and it will tell you if they both point to the same entry or not. You need to keep two copies of two different keys, increment one, ask the module if they're linked. If they are, then keep incrementing one until you get to the next verse that isn't linked. If they are not, then set the base key equal to the incremented key and render out the next verse.</div><div><br></div><div>--Greg</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 15, 2018 at 5:09 AM Peter Von Kaehne &lt;<a href="mailto:refdoc@gmx.net">refdoc@gmx.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How are linked verses practically encoded? <br>
<br>
I would like to fix the diatheke etc at some point to not put out duplicate verses and I do know that xiphos etc do not do so, so what wouldl I need to look for?<br>
<br>
Thanks<br>
<br>
Peter<br>
<br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</blockquote></div>
</blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>