Hi Mathias,

>> I still think that defining ThisComponent as "the component from which
>> the macro was invoked" (as opposed to "the component which the macro is
>> embedded into") was the better choice, and causes less hassle. Finally,
>> this means that only newly written code needs to care for the new
>> concept. If we had changed ThisComponent otherwise, then every existing
>> code (implementing such a functionality as sketched above) would have
>> needed to be rewritten.
> 
> I'm not sure that the "new concept" would change a lot at all - except
> for those cases where the "old concept" creates an undefined situation
> anyway.

Up to 3.0, database documents, and its sub components (forms, reports,
queries, tables, relation designer) didn't participate in the
ThisComponent game (since the implementation of this global property was
purely SFX based). So, if somebody wrote a (global) macro and triggered
this from within one of the DB components/documents, ThisComponent was
effectively undefined.

This scenario - executing such macros from with DB components - is the
only one I know where 3.1 differs from 3.0. So, yes, you're absolutely
right :)

> The only situation where the "new concept" would be wrong is when a
> macro from one document is executed while another one is active.
> But perhaps this does not make a lot of sense anyway and we should
> forbid that?!

This is forbidden already: The "Run Macro" dialog lists the global
macros, plus the ones from the current document, nothing else.

It is of course still possible to programmatically execute a macro which
resides in a non-current document, and therein, ThisComponent points to
the embedding doc, not the active one.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [email protected] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to