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

Ariel Constenla-Haile wrote:
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, if
and I click on the menu command, I do not want another session of the
extension!

Is there any way to do that?
in what language are you programming?
I'm programming in java

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 this depends on your design.

Regards


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

Reply via email to