Mike Traum wrote:
> My understanding is that when using the Bootstrap, you cannot detect
> what version of OOo you're connected to.
> 
> So, what is the best practice when you're using services that have
> been newly (or even not so newly) added to the api?
> 
> For example, I'm using the
> 'com.sun.star.gallery.GalleryThemeProvider' service, which is new to
> 1.9.xx. Is the best practice to create instances of all of your
> services on startup, and then catch the Exception, which will tell
> you that it's unsupported? 

Of course not all services on startup. You should try to create your
services *when you need them* and if you fail to create them you must
deal with the error. There are other reasons than the wrong version that
let the creation of services fail, so you need the error handling
anyway. What could a version information add to this?

It is an essential element of the OOo API that functionality is queried
dynamically at runtime.

> Being that the general 'Exception' is thrown on
> XMultiComponentFactory.createInstanceWithContext, is this the only
> case where the Exception will be thrown so that I do have a reliable
> way of detecting this specific error?

Sorry, I don't understand this. What general Exception are you talking
about?

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to