Re: [Libreoffice] uno discoverability

2011-11-21 Thread Stephan Bergmann
On 11/17/2011 06:55 PM, Michael Meeks wrote: On Wed, 2011-11-16 at 14:16 +0100, Stephan Bergmann wrote: throw FooException(Failure loading file '%S' code %d, ... This (as well as cooking something up using OSL_FORMAT) would have the disadvantage that it potentially converts data from

Re: [Libreoffice] uno discoverability

2011-11-17 Thread Michael Meeks
Hi Stephan, On Wed, 2011-11-16 at 14:16 +0100, Stephan Bergmann wrote: throw FooException(Failure loading file '%S' code %d, ... This (as well as cooking something up using OSL_FORMAT) would have the disadvantage that it potentially converts data from UTF-16 to char (%S) and then from

Re: [Libreoffice] uno discoverability

2011-11-16 Thread Laurent Godard
Hi all Thanks to Thorsten pointing the old (2004) pyUno I revived it recently and made it workable again, removing some unnecessary things but it is in my plans to make it cleaner as a lot of things is outdated (eg. old OOo links to idl reference - need to be updated). I hope to find time in a

Re: [Libreoffice] uno discoverability

2011-11-16 Thread Michael Meeks
On Tue, 2011-11-15 at 20:34 +0100, Michael Stahl wrote: com.sun.star.uno.RuntimeException: Presumably python is showing you the message embedded in the exception (which is empty ?) or do we miss even that ? in a lot of UNO API implementations the only form of error reporting

Re: [Libreoffice] uno discoverability

2011-11-16 Thread Michael Stahl
On 16/11/11 11:25, Michael Meeks wrote: On Tue, 2011-11-15 at 20:34 +0100, Michael Stahl wrote: in a lot of UNO API implementations the only form of error reporting used is throw RuntimeException;, which leaves (as you correctly note) a lot to be desired in terms of usability for the hapless

Re: [Libreoffice] uno discoverability

2011-11-16 Thread Stephan Bergmann
On 11/16/2011 11:25 AM, Michael Meeks wrote: IMHO we need to make that code efficient by having a var-args style helper: throw FooException(Failure loading file '%S' code %d, aOUStr.pData, nCode); That would also be fairly code size efficient

[Libreoffice] uno discoverability

2011-11-15 Thread Kevin Hunter
Hullo List, I'm working on a school project that involves UNO with Python (talking to LO from an external invocation of Python). One of the things that I find extremely frustrating is the lack of discoverability from within the Python context. The interactive shell (IPython package and

Re: [Libreoffice] uno discoverability

2011-11-15 Thread Thorsten Behrens
Kevin Hunter wrote: One of the things that I find extremely frustrating is the lack of discoverability from within the Python context. Hi Kevin, beyond the pure python functionality, that would indeed benefit from some insightful help texts, there's introspection for UNO. See this announcement

Re: [Libreoffice] uno discoverability

2011-11-15 Thread Kevin Hunter
At 12:00pm -0500 Tue, 15 Nov 2011, Michael Meeks wrote: there are some real issues here, inasmuch that it can't be known until run-time what interfaces are supported, and lots of type information disappears down the toilet around queryInterfaces and 'any's. Unfortunately, this makes the API

Re: [Libreoffice] uno discoverability

2011-11-15 Thread Michael Stahl
On 15/11/11 18:17, Thorsten Behrens wrote: Kevin Hunter wrote: One of the things that I find extremely frustrating is the lack of discoverability from within the Python context. Hi Kevin, beyond the pure python functionality, that would indeed benefit from some insightful help texts, there's

Re: [Libreoffice] uno discoverability

2011-11-15 Thread Michael Stahl
On 15/11/11 19:57, Kevin Hunter wrote: Is it similarly as convoluted and difficult to have an explanation with, say, RuntimeExceptions? For instance, with a document with only one sheet, one should not be able to remove the last sheet, right? doc.Sheets.removeByName('Sheet1')