[sword-devel] SWMgr augmentation

Will Thimbleby sword-devel@crosswire.org
Tue, 29 Apr 2003 21:53:35 +0100


Hi all,

Thanks for the tip on augmentModules.

Right lets explain what I'm trying to do... I'm trying to make MacSword  
more Mac like in its dealing with modules. What I'm trying to get is to  
have every module in its own folder, so users can add and remove them  
easily. I'm trying to do this by using augmentModules to add each  
sub-directory into the SWMgr.

This mostly works except that augmentModules (which unfortunately is  
protected - I have to subclass just to get at this) crashes if there  
were no modules in the original directory that the SWMgr constructor  
was given. This I can work around, but if there's a way this can be  
altered in SWMgr that would be very useful.

But it also crashes if I use the a module directory that has a module  
located in a deep directory tree, as either the config path given to  
the constructor or an augmented path.

For instance:
/Users/william/Desktop/Programming/Projects/BibleProg/Bibles/ 
StrongsGreek Folder/modules/lexdict/rawld/strongsgreek

Crashing in SWModule::SWModule at stdstr(&modname, imodname);

This happens with all long paths (over 128 chars at a guess).

Also what does SWMgr::InstallScan do?

Cheers, Will