Frank Schönheit - Sun Microsystems Germany wrote: > Hi Mathias, > > thanks for the explanations, and one question: > >> After discovering that the XCloseable API is not usable in Basic and > > Forgive me if that's a dumb question, but: Why? The only thing which > comes to my mind is that you cannot throw an exception in Basic. If you > could, you could use the Basic function createUnoListener (or so) to > create a listener which vetoes. > > This to sounds like a limitation of the concrete UNO language binding > for Basic, not like a limitation of the concept.
Of course it's a limitation of the language binding but IMHO we shouldn't design concepts from that we know that they don't work in at least one important language binding. But there is another even more important problem: Even if you don't want to create a listener and you just want to call "close(true)" in Basic to make sure that the document will get closed *in case there is no other interested party anymore* you might get an exception that will stop your program though there is no real reason for it. That's the reason that I think that throwing exceptions should be restricted to cases where an error occured, something that *must* be handled by the caller. This is not true in case of failure to close a document because we have means to handle this situation gracefully. 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]
