[sword-devel] ActiveDiatheke ocx: may have gotten working again

Chris Little sword-devel@crosswire.org
Mon, 20 Oct 2003 22:03:50 -0700 (MST)


On Mon, 20 Oct 2003, Lynn Allan wrote:

> Gotta be careful not to bet expectation too high. Some mea culpa's
> 
> I have a series of questions reflecting my ignorance of Sword:
> 
> 1. What is the "range" argument for the function "doquery"? This changed
> from having 11 arguments to 12 arguments. The default is 0. I didn't see
> what this variable was for. For the first cut at getting ActiveDiatheke to
> work, I set it to 0. I don't know enough about what the software is supposed
> to do to see if anything breaks (key of Eph 2:22-3:2 still works, which was
> a guess on my part on what "range" might pertain to ???)

It's been a REALLY long time since I worked on this stuff, but if memory 
serves, I would guess that it is a search range.  So if you're just trying 
to retrieve a set of verses, its value will be ignored.  But if 
m_searchtype has a search value, it will get used to limit search range.
 
> long CActiveDiathekeCtrl::query()
> {
>  ostrstream output;
>   char *range = 0;  //lda
>  unsigned char opt = ...
>  doquery(m_maxverses,
>           m_outputformat + 1,
>           m_outputencoding + 1,
>           opt,
>           m_searchtype,
>           range,                   //lda
>           (LPCTSTR)m_book,
>           (LPCTSTR)m_locale,
>           (LPCTSTR)m_key,
>           &output,
>           (LPCTSTR)m_script,
>           m_variants);
>  output << '\0';
>  char* versevalue = output.str();
>  if (versevalue) {
>   m_value = versevalue;
>   delete versevalue;
>   FireValueChanged();
>   return TRUE;
>  }
>  return FALSE;
> }
> 
> 
> 2. What is "ICU"? Is this for internationalization. The VisualC++ .dsp has
> standard "Debug" and "Release" configurations, but also had "Debug with ICU"
> and "Release with ICU". There were missing files like
> #include <unicode/utypes.h>
> (in utf8arshaping.h) that didn't show up with the CVS tree. Therefore, the
> "Debug with ICU" and "Release with ICU" didn't compile.

ICU is kind of for internationalization.  We use it for a few Unicode 
things like case folding, logical to visual reordering, and (at least 
potentially) Arabic shaping.  We also use it for the transliteration 
filter.  In the future we will use it for regular expression searches.
 
> 3. Is there more to download beyond the basic "sword" using WinCVS 1.2? This
> might explain the missing ICU files.

Yes.  Check out icu-sword and compile the project in source/allinone/.  
But the library will work fine without ICU.

--Chris