Re: [api-dev] quickstarter / storeToURL problem (python)
Mathias Bauer schrieb: Daniela Garling wrote: hello again, thanks for the quick reply. unfortunately i cannot give any more details regarding the errormessage. i'm not catching it anymore, but all it tells me is model.storeToURL(storeUrl, storeProps) uno.com.sun.star.task.ErrorCodeIOException You should catch this exception and tells us which ErrorCode is reported by this exception (it's a member of the exception). Best regards, Mathias I don't quite know how to. What I do with python is a try: something except ErrorCodeIOException: do something else. Now, how would i catch the exception in order to get to its ErrCode? My debugger tells me that ErrorCodeIOException is a class-object consisting of a __doc__ string (which is None), __module__ (which is uno), __pyunointerface__ (com.sun.star.task.ErrorCodeIOException), __pyunostruct__ (com.sun.star.task.ErrorCodeIOException), and typeName (also a string com.sun.star.task.ErrorCodeIOException). No ErrCode to be found. What am I doing wrong? As to the idea of inserting a little break between saving the document to disk and extracting it's raw text: I had implemented a little test to try that. the function rawText would try storeToURL and upon an errorcodeioexception I had it wait for 2 seconds before calling itself again and so trying to extract it again. I had it running for a couple of minutes to no avail. :/ Thanks for taking the time! Daniela - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] quickstarter / storeToURL problem (python)
Daniela Garling a écrit : I don't quite know how to. What I do with python is a try: something except ErrorCodeIOException: do something else. Now, how would i catch the exception in order to get to its ErrCode? Except Exception, e: print str(e) that would make it fine :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Document is loaded in a background window
Try out the following code. It loads the file /tmp/bar.sxw and afterwards displays a message box. The problem is that the file is loaded in a background window, at least on my system. I.e. the current window obscures the window with the new document. Sub Test1 Dim NoArgs() As New com.sun.star.beans.PropertyValue Dim Service As Object Service = createUnoService(com.sun.star.frame.Desktop) Dim Document As Object Document = Service.loadComponentFromURL(file:///tmp/bar.sxw, _ _blank, 0, NoArgs()) MsgBox foo End Sub To get rid of the problem I found two solutions, but neither is satisfactory: * Don't display the message box * Close the window in front by using setVisible: StarDesktop.CurrentFrame().getContainerWindow().setVisible(False) So, what do you suggest? How do I make the window with the new document appear in the foreground? Or, alternatively, how do I lower the current window? -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] quickstarter / storeToURL problem (python)
Daniela Garling wrote: snip I don't quite know how to. What I do with python is a try: something except ErrorCodeIOException: do something else. Now, how would i catch the exception in order to get to its ErrCode? My debugger tells me that ErrorCodeIOException is a class-object consisting of a __doc__ string (which is None), __module__ (which is uno), __pyunointerface__ (com.sun.star.task.ErrorCodeIOException), __pyunostruct__ (com.sun.star.task.ErrorCodeIOException), and typeName (also a string com.sun.star.task.ErrorCodeIOException). No ErrCode to be found. What am I doing wrong? I dont know how exceptions are handled in python ... But on other languages (e.g. C++) you write the following one: try { doSomething(); } catch(const ErrorCodeIOException ex) { long nError = ex.ErrCode; printf(error = %d\n, nError); } As to the idea of inserting a little break between saving the document to disk and extracting it's raw text: I had implemented a little test to try that. the function rawText would try storeToURL and upon an errorcodeioexception I had it wait for 2 seconds before calling itself again and so trying to extract it again. I had it running for a couple of minutes to no avail. :/ Implementing a timeout-retry scenario makes no sense. Because it will run into trouble everytime you: a) start the executable on another machine b) or your machine is used by other processes too etcpp. Doing so can be a workaround only. Ciao Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [api-dev] Document is loaded in a background window
Hi Felix, I didn't try it, but perhaps this might help: Document.getCurrentController().getFrame().getContainerWindow().toFront() Martin -Original Message- From: Felix E. Klee [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 1:06 PM To: dev@api.openoffice.org Subject: [api-dev] Document is loaded in a background window Try out the following code. It loads the file /tmp/bar.sxw and afterwards displays a message box. The problem is that the file is loaded in a background window, at least on my system. I.e. the current window obscures the window with the new document. Sub Test1 Dim NoArgs() As New com.sun.star.beans.PropertyValue Dim Service As Object Service = createUnoService(com.sun.star.frame.Desktop) Dim Document As Object Document = Service.loadComponentFromURL(file:///tmp/bar.sxw, _ _blank, 0, NoArgs()) MsgBox foo End Sub To get rid of the problem I found two solutions, but neither is satisfactory: * Don't display the message box * Close the window in front by using setVisible: StarDesktop.CurrentFrame().getContainerWindow().setVisible(False) So, what do you suggest? How do I make the window with the new document appear in the foreground? Or, alternatively, how do I lower the current window? -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Accessing global constant in other library?
How can I access global constants in another library? I want to use this method as a basis for simple configuration: The main code is to be stored under /opt/OpenOffice.org1.1.4/share/basic and each user's configuration is to be stored under ~/OpenOffice.org1.1.4/user/basic -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] OO Basic editor questions
Well, it is a new day and my attitude has been adjusted by sleep. I have the 2.0.1 source downloading from a mirror presently - would it be safe to assume that there hasn't been a lot done to the IDE between this the current 151 build? Last question for the moment - It appears that the build process for OO is fairly lengthy, from what I have read, so I will push it to an old machine currently sitting idle. Given that now is as good time to make a major change as there is going to be - any good reason, beyond personal preference, to NOT wipe WinXP from the disk and go with Linux for the build machine? What of going with the community version of Solaris - pros or cons on that choice? Thanks for any advice and for your guys work to date. Drew Andrew Jensen wrote: *chuckling*...OK...so it's either ...Show me the money! or delve into a 6 million line C++ program...nice choice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Accessing global constant in other library?
Am Donnerstag, den 19.01.2006, 19:21 +0100 schrieb Felix E. Klee: Am Donnerstag, 19. Januar 2006 16:23 schrieb Felix E. Klee: How can I access global constants in another library? If constants in another library are inaccessible, how do I access a function in another library? Have you tried typing public inthe IDE and then hitting the F1 key? And you can search the help for LibraryContainer for the other answer. Have fun, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Accessing global constant in other library?
Am Donnerstag, 19. Januar 2006 16:23 schrieb Felix E. Klee: How can I access global constants in another library? If constants in another library are inaccessible, how do I access a function in another library? -- Dipl.-Phys. Felix E. Klee Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] quickstarter / storeToURL problem (python)
Daniela Garling wrote: Now, how would i catch the exception in order to get to its ErrCode? My debugger tells me that ErrorCodeIOException is a class-object consisting of a __doc__ string (which is None), __module__ (which is uno), __pyunointerface__ (com.sun.star.task.ErrorCodeIOException), __pyunostruct__ (com.sun.star.task.ErrorCodeIOException), and typeName (also a string com.sun.star.task.ErrorCodeIOException). No ErrCode to be found. What am I doing wrong? Sorry, I don't know the Python binding. From the idl file you can see that the ErrCodeIOException has a member ErrCode of type long. I expected that the Python bindings allows to access this member. Maybe someone who knows the Python binding can help us here. As to the idea of inserting a little break between saving the document to disk and extracting it's raw text: I had implemented a little test to try that. the function rawText would try storeToURL and upon an errorcodeioexception I had it wait for 2 seconds before calling itself again and so trying to extract it again. I had it running for a couple of minutes to no avail. :/ It seems that you misunderstood me. I asked you to do the following: quit quickstarter wait 10 secs start quickstarter wait 10 secs start python app initiate creation of document save document to disk, thereby initiate extraction of rawtext Does that make a difference? 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]
Re: [api-dev] Document is loaded in a background window
Felix E. Klee wrote: Try out the following code. It loads the file /tmp/bar.sxw and afterwards displays a message box. The problem is that the file is loaded in a background window, at least on my system. I.e. the current window obscures the window with the new document. Sub Test1 Dim NoArgs() As New com.sun.star.beans.PropertyValue Dim Service As Object Service = createUnoService(com.sun.star.frame.Desktop) Dim Document As Object Document = Service.loadComponentFromURL(file:///tmp/bar.sxw, _ _blank, 0, NoArgs()) MsgBox foo End Sub To get rid of the problem I found two solutions, but neither is satisfactory: * Don't display the message box * Close the window in front by using setVisible: StarDesktop.CurrentFrame().getContainerWindow().setVisible(False) Bad idea! So, what do you suggest? How do I make the window with the new document appear in the foreground? Or, alternatively, how do I lower the current window? OOo always tries to put a window opened with target _blank to the foreground. If it really appears there and *when it does* is a decision of the window manager. It seems that on your system the WM brings the window to front asynchronously, but before the window comes to front you create the messagebox and it gets the current front window as its parent. But of course the messagebox gets the focus so it sends your new window back before it can come to front. Which window manager do you use? 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]
Re: [api-dev] Document is loaded in a background window
Felix E. Klee wrote: Am Donnerstag, 19. Januar 2006 13:16 schrieb Martin Thoma: I didn't try it, but perhaps this might help: Document.getCurrentController().getFrame().getContainerWindow().toFront() Thanks, this does the trick! There's only one minor peeve remaining: The message box is displayed in front of the old document, not in front of the new document. Oops, if I had seen the answer before I could have saved my mail. :-) Anyway, I already explained why the message box is displayed in front of the old document. If the tip from Martin really works your message box should appear in front of the new document if you created it *after* putting the new window to front. 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]
Re: [api-dev] deploying a template through addon
Hi mathias thansk for your response I'm afraid that is because OOo is not able to access the template (evaluating %origin always needs some explicit code, it is meant as somethin an Add-On accesses, but not the regular OOo code). looking in the uno-package cache, i read /home/lgodard/.openoffice.org2/user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registry/data/org/openoffice/ucb in hierarchy.xcu valuevnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages/vrJ1ZG_/cedricTemplate.zip/orange.otp/value while in the addon, in /home/lgodard/.openoffice.org2/user/uno_packages/cache/uno_packages/vrJ1ZG_/cedricTemplate.zip in hierarchy.xcu value%origin%/orange.otp/value you mean that the problem is the interpretation of valuevnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/ Are you sure that you could deploy a template as an Add-On in an older version of OOo? hum, it was ages ago but iirc yes btw, if the feature is not implemented, is it planned i think it is important for deployement of 'extensions' and we will soon need it thanks again for your response Laurent -- Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org Indesko http://www.indesko.com Nuxeo CPS http://www.nuxeo.com - http://www.cps-project.org Livre Programmation OpenOffice.org, Eyrolles 2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] oood.py and multiple instances on Linux
Hi Joerg simply install OOo2. Afterwards start ./soffice -env:UserInstallation=/home/oood/ooo1.1_srvXX i confirm it works some more details here if needed http://blogs.nuxeo.com/sections/blogs/laurent_godard/2005_08_04_ooo2_and_multiple and work through the initial dialogs one time. yes, or more dirty use the -headless switch I have not yet verified, that oood works with OOo2.0, but it should do. yers it works Laurent -- Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org Indesko http://www.indesko.com Nuxeo CPS http://www.nuxeo.com - http://www.cps-project.org Livre Programmation OpenOffice.org, Eyrolles 2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]