Hi Daniel,<div><br></div><div>I have never gone deep enough into the SWORD API to work with the zText constructor directly.</div><div>However, I would suggest that the more &quot;normal&quot; way of accessing modules is using the SWMgr class (second part of the primer you link to).  Try creating an SWMgr and using SWMgr.getModule(&quot;ESV&quot;) [or whatever the C# equivalent is].</div>

<div><br></div><div><div class="gmail_quote">Jon</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sat, Aug 11, 2012 at 6:25 PM, Daniel Hughes <span dir="ltr">&lt;<a href="mailto:trampster@gmail.com" target="_blank">trampster@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>I&#39;m trying to use sword from c#. I have used swig to generate a wrapper for just enough of sword to open a module and render some text.</div>

<div><br></div><div>I followed the example in the API primer found here: </div>
<div><a href="http://www.crosswire.org/sword/develop/swordapi/apiprimer.jsp" target="_blank">http://www.crosswire.org/sword/develop/swordapi/apiprimer.jsp</a></div><div><br></div><div>I downloaded the webster module only to discover that it was zText module and not a rawtext module as shown in the  example. So instead I tried to use the ESV module (which is also ztext).</div>


<div><br></div><div>However the RenderText() call returns nothing (empty string). Here is the code I am using:</div><div><br></div><div><div>SWKey key = new SWKey(&quot;jas 1:18&quot;);</div><div>zText esv = new zText(&quot;modules/texts/ztext/esv&quot;, &quot;ESV&quot;, &quot;English Standard Version&quot;);</div>


<div>esv.setKey(key);</div><div>Console.WriteLine (esv.RenderText());</div></div><div><br></div><div>I noticed that that even if I pass in a folder that does not exist, I never get an error, RenderText just carries on returning an empty string. I created a wrapper for the .Error() function which always returns 0.</div>


<div><br></div><div>I have tried using an absolute path, a relative path, i&#39;ve tried using an ESV module I downloaded from crosswire and one which I installed using Xiphos.</div><div><br></div><div>I am the developer of a bible application found in the debian repros and would love to add support for sword modules. Any help would be greatly appreciated.</div>


<div><br></div><div>Cheers,</div><div>Daniel Hughes</div>
<br>_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br></blockquote></div><br></div>