[sword-devel] using a zText module

2012-08-11 Thread Daniel Hughes
Hi, I'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. I followed the example in the API primer found here: http://www.crosswire.org/sword/develop/swordapi/apiprimer.jsp I downloaded the webster module only to

Re: [sword-devel] using a zText module

2012-08-11 Thread Jonathan Morgan
Hi Daniel, I have never gone deep enough into the SWORD API to work with the zText constructor directly. However, I would suggest that the more normal 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(ESV)

Re: [sword-devel] using a zText module

2012-08-11 Thread Peter von Kaehne
On Sat, 2012-08-11 at 20:25 +1200, Daniel Hughes wrote: I'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. If you have working C# bindings, could you update the existing ones? There is a not totally

Re: [sword-devel] using a zText module

2012-08-11 Thread Daniel Hughes
I managed to get it working with the following code: using(SWMgr mgr = new SWMgr()) using(SWModule module = mgr.getModule(ESV)) using(SWKey key = new SWKey(jas 1:18)) { module.setKey(key); Console.WriteLine (module.RenderText()); } I wouldn't go as far as to say that I have working c#

Re: [sword-devel] using a zText module

2012-08-11 Thread Greg Hellings
On Sat, Aug 11, 2012 at 9:38 PM, Daniel Hughes tramps...@gmail.com wrote: I managed to get it working with the following code: using(SWMgr mgr = new SWMgr()) using(SWModule module = mgr.getModule(ESV)) using(SWKey key = new SWKey(jas 1:18)) In SWORD you should _never_ instantiate an instance