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 
toolbar.
Are you instantiating the JFrame everytime in the call to dispatch()? do yo 
have a custom class extending JFrame? ...

> 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 JFrame (the one
> created clicking over the toolbar button), then another process starts...
> Using the flag isn't enough for managing this...

it seems to me you want to share the same JFrame instance with the 
ProtocolHandler invoked form the menu and the toolbar. Again, this can be 
easy, depending on how you design it there are differnt ways to know if your 
JFrame instance is running.

> So, you've told me "Another point is: do you want your extension to
> "run" only once per frame, or once per OOo main process?", the answer is
> only once per OOo main process...
>
> once per OOo main process?

I meant: you want only once instance of your JFrame in the whole office? hat 
happens if the user clicks on your toolbar from another document? do you 
instantiate another JFrame or just set the focus on the only one instance? 
etc.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


"Aus der Kriegsschule des Lebens
                - Was mich nicht umbringt,
        macht mich härter."
                Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to