[api-dev] running extension once

2009-03-11 Thread cguerber
ippet as I do not have any IDE on my laptop but look at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html Regards, Christophe - Message d'origine De : Tobias Krais À : dev@api.openoffice.org Envoyé le : Mercredi, 11 Mars 2009, 12h31mn 10s Objet : Re: [api-dev] running

Re: [api-dev] running extension once

2009-03-11 Thread Ariel Constenla-Haile
Hello giancarlo, [top-posting is IMHO very annoying, so I cut your answer and paste at the bottom, see http://en.wikipedia.org/wiki/Posting_style#Top-posting] On Wednesday 11 March 2009, 09:12, giancarlo wrote: > Sorry, I previously misunderstood you before... > In the call to dispatch() I call

Re: [api-dev] running extension once

2009-03-11 Thread Tobias Krais
Hi Giancarlo, > I've created the extension through the NetBeans plugin for OOo wizard, > so I've only added my methods and I call them from the "dispatch( )", I > wouldn't like to modify the java code created by the wizard... you don't have to change much. Add an additional (singleton) class (see

Re: [api-dev] running extension once

2009-03-11 Thread giancarlo
Sorry, I previously misunderstood you before... In the call to dispatch() I call another method which does some checks and then creates an instance of a class which extends JFrame. "I meant: you want only once instance of your JFrame in the whole office?" (I've misunderstood this before) : the

Re: [api-dev] running extension once

2009-03-11 Thread giancarlo
I've created the extension through the NetBeans plugin for OOo wizard, so I've only added my methods and I call them from the "dispatch( )", I wouldn't like to modify the java code created by the wizard... Tobias Krais wrote: Hi Giancarlo, then this can be rather simple, and does not dep

Re: [api-dev] running extension once

2009-03-11 Thread Ariel Constenla-Haile
Hello giancarlo, On Wednesday 11 March 2009, 08:39, giancarlo wrote: > Using the flag I can manage only the button or the menu call, but not > both... I guess [without seeing the code it's just wild guessing] you have a ProtocolHandler implementation that's instantiated both by the menu and the

Re: [api-dev] running extension once

2009-03-11 Thread giancarlo
Using the flag I can manage only the button or the menu call, but not both... If I click over the extension button (from the toolbar), then no new extension process (a simple JFrame) starts if I click again before closing the existing JFrame But if I click over the menu item before closing the J

Re: [api-dev] running extension once

2009-03-11 Thread Tobias Krais
Hi Giancarlo, > then this can be rather simple, and does not depend on OOo API, but in how > you > design your implementation. > Another point is: do you want your extension to "run" only once per frame, or > once per OOo main process? > As you've been told, you can solve this with a flag; but

Re: [api-dev] running extension once

2009-03-11 Thread Ariel Constenla-Haile
Hello giancarlo, On Wednesday 11 March 2009, 08:12, giancarlo wrote: > >> My extension has: > >> - a toolbar button > >> - a menu item > >> > >> These do the same thing, and I need the extension can run no more than > >> once. > >> For example: I click the toolbar button, the extension starts. Now

Re: [api-dev] running extension once

2009-03-11 Thread giancarlo
I'm programming in java Ariel Constenla-Haile wrote: Hello giancarlo, On Wednesday 11 March 2009, 07:42, giancarlo wrote: My extension has: - a toolbar button - a menu item These do the same thing, and I need the extension can run no more than once. For example: I click the toolbar button,

Re: [api-dev] running extension once

2009-03-11 Thread Ariel Constenla-Haile
Hello giancarlo, On Wednesday 11 March 2009, 07:42, giancarlo wrote: > My extension has: > - a toolbar button > - a menu item > > These do the same thing, and I need the extension can run no more than > once. > For example: I click the toolbar button, the extension starts. Now, if > and I click on

[api-dev] running extension once

2009-03-11 Thread giancarlo
My extension has: - a toolbar button - a menu item These do the same thing, and I need the extension can run no more than once. For example: I click the toolbar button, the extension starts. Now, if and I click on the menu command, I do not want another session of the extension! Is there any