[sword-devel] Feature request: SWModule::isEmpty()

sword-devel@crosswire.org sword-devel@crosswire.org
Sun, 28 Jul 2002 15:18:24 +0600

> So I guess the initial ghost entry fix worked for you? :)

Yes, thanks.

> Actually, any of the positioners should return an out of bounds error if 
> the module is empty.  Do they not?  eg.
> module = TOP;
> if (module.Error())
> 	cout << "Module is empty\n";

Yes, again does not work:

 371         module->deleteEntry();
 372         module->getRawEntry();
 373         module->SetKey(module->KeyText());
 374         if(!module->Error()) {

After deleting the last remaining entry (when module becomes empty), module->
Error()==0. (It is RawLD.)

Actually what I need is namely check of module emptiness after deleteEntry().


> porton@narod.ru wrote:
> > Please add SWModule::isEmpty() to check whether a module is empty, i.e. 
> > containing zero entries (useful after opening module and after deleting an 
> > entry).
> > 
> > It is possible to do it with current interface, but in a silly mean.
Victor Porton (porton@ex-code.com)

Victor Porton (porton@ex-code.com)