[bt-devel] setText or setContent in CModuleManager
Torsten Uhlmann
bt-devel@crosswire.org
22 Jan 2000 18:09:53 +0100
>>>>> "Joachim" == Joachim Ansorg <Jockel123@gmx.de> writes:
> Hi! I wan't to implement the function in CModuleManager to set
> the text or the content of a presenter.
CModuleManager is just an abstract class. You can't work with it. It
implements however the interface all derived classes use. So for SWORD I
created a CSWORDModuleManager. A backend can now speak to all Managers
on a common basis, the API of CModuleManager.
But the ModuleManager is not the place to get or set text. You do this
via CModuleInfo where there is a CSWORDModuleInfo. Look at this API and
if it is not sufficient tell me what to add. Please don't add anything
to this classes at this time, I'm experimenting very much and trying to
figure out how to do it best. So I change the API from time to time- you
would waste efforts. I think I will post next week a class hierarchy
where you can see who is responsible for what.
For now, you classes should know:
CBackEnd
is the class that will manage all modules for you and will give
you a ListCModuleInfo
CModuleInfo
if you need to get text from a specific module (maybe the one
selected in the tree)
CData
the result will be given in a CData object. Don't create it or
delete it, it is created and deleted by the one who gives it,
except you need a copy, then you can deep copy the object.
CKey
this will hold key information (key, moduleName, moduleType), is
part of CData and can be ordered on its own.
I hope this helps for the first time. I'm not yet done with all my
thoughts, so the API is subject to change.
I didn't address searching at this point. It will come when these
classes are usable.
But anyway Joachim, it is very good for me that you already create a
connection between front and backend, how could I else test what I
implement. So it would be good if we had soon some way to test the
ModuleInfo API.
Thanks for your efforts!
> How could I make the function universal (we need later preenters
> with other content than text or HTML). Should a presenter now get
> the SWORD module it works with?
> Thanks!
> -- Joachim BibleTime - the bible study program for KDE
> http://www.bibletime.de/ info@bibletime.de
--
best regards,
Torsten Uhlmann
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TUhlmann@gmx.de
TUhlmann@debis.com
http://www.tuhlmann.purespace.de
http://www.bibletime.de
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wise men still seek him!