addTab changes application.getMethodTriggerFormName() output

Hi,

I have an onLoad method attached to a form. In this onLoad method, I dynamically add a tab to a tabpanel, using the addTab function.

In this onLoad method, I also call several times application.getMethodTriggerFormName(). Since I got some weird behavior, I dug in and put some application.output’s into my code in several places to isolate the source of the weird behavior. In the end I found it: when you call addTab, afterwards, application.getMethodTriggerformName retuns the name of the added tab, instead of the name of the form that is being loaded and to which the currnt method is attached.

Just tested this in 2.2.5 and 3.0b3: both the same behavior.

This is the code I used:

application.output("Test0: "+application.getMethodTriggerFormName());
elements.main_bottom.addTab(forms.XXX,'bla',null,null,null,null);
application.output("Test1: "+application.getMethodTriggerFormName());

This code resulted in the following output:
Test0: Main
Test1: XXX

Can this be fixed?

Paul