Re: [api-dev] Implementing UNO service as singleton

2008-07-11 Thread Thomas Lange - Sun Germany - ham02 - Hamburg
Hi Marcin, Maybe this link will be helpfull: http://www.javacoffeebreak.com/articles/designpatterns/index.html To me it looks as if it covers all related problems. Other similar link http://www.javaworld.com/javaworld/jw-04-2003/jw-0425-designpatterns.html

Re: [api-dev] Implementing UNO service as singleton

2008-07-11 Thread Stephan Bergmann
Marcin Miłkowski wrote: Hi, I'm implementing a class that implements a known OOo service (actually, several ones, but the important one is XGrammarChecker). The problem is that the class is instantiated many times in OOo whenever a UI item is used, and the instances created do not share

RE: [api-dev] alternative for event onFirstVisibleTask

2008-07-11 Thread Daan de Wit
This works for us: ?xml version='1.0' encoding='UTF-8'? oor:component-data oor:name=Jobs oor:package=org.openoffice.Office xmlns:oor=http://openoffice.org/2001/registry; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; node oor:name=Jobs

[api-dev] Also XScriptProviderFactory ... (Re: [api-dev] OOo ScriptingFramework, XDispatchHelper and stdout/stderr ?

2008-07-11 Thread Rony G. Flatscher
Hi there, in the meantime I could test the dispatching of macros via the OOo ScriptingFramework using XScriptProviderFactory. However, same problem as with XDispatchHelper: invoking more than one (ooRexx) macros via the scripting framework works flawlessly, if the script is *not* invoked by

Re: [api-dev] Implementing UNO service as singleton

2008-07-11 Thread Marcin Miłkowski
Stephan Bergmann pisze: Marcin Miłkowski wrote: Hi, I'm implementing a class that implements a known OOo service (actually, several ones, but the important one is XGrammarChecker). The problem is that the class is instantiated many times in OOo whenever a UI item is used, and the instances

Re: [api-dev] Implementing UNO service as singleton

2008-07-11 Thread Stephan Bergmann
Marcin Miłkowski wrote: Stephan Bergmann pisze: Marcin Miłkowski wrote: Hi, I'm implementing a class that implements a known OOo service (actually, several ones, but the important one is XGrammarChecker). The problem is that the class is instantiated many times in OOo whenever a UI item is

Re: [api-dev] Implementing UNO service as singleton

2008-07-11 Thread Marcin Miłkowski
Hi Stephan, Note that com.sun.star.linguistic2.XGrammarChecker is an interface, not a service. Of course, but anyway I'm not implementing any code that displays public methods other than documented in API. Sorry, I do not understand you here. (But that's probably not so important,

Re: [api-dev] Implementing UNO service as singleton

2008-07-11 Thread Marcin Miłkowski
Hi again, Stephan wrote: I do not understand your first part (about classpath), but multiple instances are of course still generated when you use com.sun.star.comp.loader.FactoryHelper.createComponentFactory in __getComponentFactory. You have to return your own implementation of

Re: [api-dev] Pause the script for user's input in .odt

2008-07-11 Thread Andrew Douglas Pitonyak
What type of data file do you want to open? What kind of data do you want to read? How do you know where to put the data? sergio wrote: I have a script in StarBasic that find some data, then open a file and should wait for the user's input (move the cursor to the desired destination of the

Re: [api-dev] Pause the script for user's input in .odt

2008-07-11 Thread sergio
Thanks for your answer. I explain better as I can: I open a calc document, I read the first record, where there are the header, then I open a writer document, and I should open a non-modal(?) dialog, where I ask the user: Put the cursor where you want the first header, with a ok button to

Re: [api-dev] Pause the script for user's input in .odt

2008-07-11 Thread sergio
sergio ha scritto: Thanks for your answer. I explain better as I can: I open a calc document, I read the first record, where there are the header, then I open a writer document, and I should open a non-modal(?) dialog, where I ask the user: Put the cursor where you want the first header,

Re: [api-dev] Pause the script for user's input in .odt

2008-07-11 Thread Andrew Douglas Pitonyak
sergio wrote: sergio ha scritto: Thanks for your answer. Your welcome, but it looks like you solved this on your own. Bravo! -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: