[jsword-devel] Books can now be unindexed
DM Smith
dmsmith555 at yahoo.com
Tue Mar 22 19:22:06 MST 2005
Yesterday I noted that there was a refresh problem in the Books in the
Bible Picker when the
Bible was unindexed from the Book Installer. The problem was that there
were more than one
Book instances for a given module.
I fixed this by doing the following:
I made SwordBookDriver and ReadingsBookDriver singleton classes with a
BookDriver instance() method.
Books uses this via reflection to load the driver rather than reflecting
an instance via the default constructor.
Then I added a new filter to BookFilters called getBooksByDriver(BookDriver)
I changed registerDriver to compare all the books that the driver
currently has with what it had before
and updated Books.installed() to contain only those books. Specifically,
if the book was already present
I left it alone, but if it was no longer known to the driver, I removed
it. The other books I added.
In the few places that registerDriver was immediately preceded by
unregisterDriver, I removed the
call to unregisterDriver. As this was trying to achieve the net effect
of what I did in registerDriver.
More information about the jsword-devel
mailing list