Andrew Jensen wrote:

.-)
My code snippet was an example only ... and I've shown you a way, which isnt the preferred one for myself
.-)

The problem behind getActiveFrame() / getCurrentController() is the dependenc against the focus. If the application is loosing it's focus it can happen that your macro doesnt work any longer. The better way is to make it explicitly.

Every macro should "know it's frame/controller/model" on which it can work. E.g. you can create your own frame - load the right component into it and work with it. Or you can use the desktop to iterate over all open document frames and ask for some properties to find out, which of these frames/models can be interesting for you.

At least it depends from your requirements.
On the other side you can work with ActiveFrame/CurrentController ... but you should be aware that it can fail .-)

Regards
Andreas

FYI,

I changed one line

   frame = thisComponent.CurrentController.Frame

and it is working for the Data Etnry form also.

Thanks again

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to