Frank Schönheit - Sun Microsystems Germany wrote:

> 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.

You still can execute the macros from "Tools-Macro-Organize".

> 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.

Yes, this is the "old" concept. I thought you wanted to change that. And
in that case we would have a different behavior here. But that would be
bearable, IMHO. We could define that as "undefined". :-)

So indeed your case is the only relevant case where both concept lead to
different behavior. If you think that the new concept fits better to
that (is that true and what will your users think about that?), we can
think about a change.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "nospamfor...@gmx.de".
I use it for the OOo lists and only rarely read other mails sent to it.


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

Reply via email to