Hi Mathias

Hm, listeners can be registered by another macro, that itself can by
started by an event - and the listeners themselves are called by the
event source. Or what do you mean?


how is the first macro called ?


The problem with global variables is that they are, well, global. If you
have more than one extension they might use the same global variables.
Or is there something like "global in the library or module scope" that
still can "survive" the termination of the macro? (Sorry, I'm not an OOo
Basic expert.)


my fisrt thought was usin global, and yes you're right about multiple instances. can be tricky

regarding, the scope, as paolo sais, it seems to be possible that listeners are not unregistred when the macro ends i've never tested this way but this does not solve this specific problem (perharps using an array ?)


As already mentioned: currently there is no way to pass an object to a
macro that shall be called by macro URL or macro name. Problem number one.


that's why i spoke about an intermediate that relay the call, adding the event
Btw, do you mean inside the code or through xcu files ?


If I understood correctly you want to create a listbox in the toolbar
that depending on the selected entry calls different macros, right?

no
take the uno list objetc
it has events, i want to have the same ones

 Now
let's discuss the way how the listbox gets filled. This is the point
where the status updating comes into play: a dispatch object will
initialize the listbox and also change its content. As already described
this is the second problem I see that needs to be solved if we want to
use all the new toolbar features in Basic.


right, but teh same mechanism previously proposed can be used, no ?
i tis a matter of event "intializing"

Your example seems to be simpler: I don't see that you want to change
the content of the listbox at runtime, so having a static dropdown menu
button that gets the macros to be called for each list entry by a
configuration file (Addon.xcu) and not by status updating as described
by Carsten would be enough. Why establishing a complex communication
channel for something that is sent only once?


argh, perharps my example was not so good explained
obviously, i want to be able to manipulate the listbox dynamically !!
fill it, remove items, retreive active item ...
like a real componenent

If you just want to allow listboxes in toolbars bound to Basic macros we
could make this possible by creating a new toolbar button type that
reads the list from the Addon.xcu, just like a sub menu in the Addon menu.


basically, i think we should look at the already combo uno object and provide all its feature to a basic macro
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XListBox.html

I'll try to install the last m16x to see exactly this feauture working thanks to the provided example.

Thanks again

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: [... Paolo Mantovani
    • ... Mathias Bauer
      • ... Laurent Godard
        • ... Mathias Bauer
    • ... Carsten Driesner - Sun Germany - ham02 - Hamburg - Software Engineer
    • ... Laurent Godard
      • ... Mathias Bauer
    • ... Carsten Driesner - Sun Germany - ham02 - Hamburg - Software Engineer
      • ... Laurent Godard
        • ... Mathias Bauer
    • ... Carsten Driesner - Sun Germany - ham02 - Hamburg - Software Engineer
    • ... Paolo Mantovani

Reply via email to