Re: [sword-devel] Python bindings and dynamic cast

2008-03-20 Thread Luke Plant
On Wednesday 19 March 2008 23:47:02 Ben Morgan wrote: > Hi, > > Step 2 can be done using > VerseKey.castTo(swkey) Thanks! I had guessed that .castTo might help me, but I couldn't work out how to use it. Cheers, Luke -- I never hated a man enough to give him his diamonds back. (Zsa Zsa Gabor

Re: [sword-devel] Python bindings and dynamic cast

2008-03-19 Thread Ben Morgan
Hi, Step 2 can be done using VerseKey.castTo(swkey) castTo will return None if it cannot cast to it (it uses dynamic cast). This will happen if (for example) the range is Genesis 1:1, in which case it seems to just return a SWKey. Most of the wrapped classes have castTo for them. If you want to

[sword-devel] Python bindings and dynamic cast

2008-03-19 Thread Luke Plant
Hi, I've been trying to use Sword with Python bindings to simply get a list of verses with a reference like "Genesis 1:1-10". All the example code I can find, including code I have written in the past, uses a dynamic cast: 1) VerseKey::ParseVerseList() is used, which returns a ListKey* 2) A d