[sword-devel] Why ListKey?

Troy A. Griffitts sword-devel@crosswire.org
Mon, 27 May 2002 14:26:30 -0700


Victor,
	Why don't you join us on irc.openprojects.net #sword and we can explain 
the answers to some of your more complex question.  This one is fairly 
easy:  Any module can be set with a listkey.  Here is an example:

ListKey searchResults = module.Search("God love world");
searchResults.Persist(1);
module.SetKey(searchResults);
for (module = TOP; !module.Error(); module++) {
      cout << "Key: " << module.KeyText() << endl;
      cout << "Text: " << module.RenderText() << endl;
}




Victor Porton wrote:
> What is the reason why ListKey is derived from SWKey? I just don't see any 
> reasons why it need to be derived from that. (SWKey is an index for a module, 
> while I haven't found any modules classes indexed by ListKey.) Please explain 
> (or probably even remove unnecessary derivance).