Error with application.getMethodTriggerFormName() = null

Hi,

I have to check the application.getMethodTriggerFormName() but in same case it’s equal to null,and the server reports the error into the log :

2009-03-24 17:18 AWT-EventQueue-0 ERROR com.servoy.j2db.util.Debug Shouldn’t happen that the trigger element names are empty, is this called in a script that is triggered by solution startup?

why this function work in this way?

the code is :

if (application.getMethodTriggerFormName() != null){


}else{

}

during the evaluation of the IF condition the error was throwing.

how can i avoid this?

thanks

Marco

As far as I know this should/can not happen.
When is the method called and how is it called (event, other method etc, when from another method, where is that one called from etc…)

I already reported this issue to the Support System and it has been fixed this morning. The fix should be included in the next build.

Hi Marco,

How do you call the method that contains “application.getMethodTriggerFormName()” ?

Laurian

Hi Laurian,

the flux is the following:

|____ |_____________ in wich there's the IF condition with (application.getMethodTriggerFormName()==null)

this sub method work in this way because is called in other part of code directly in same case then i have to check who is the “caller”.

thanks Nicola for the information and Marcel too for the answer

The fix Nicola said is for a global method who is called from Smart client menu. In 3.5, application.getMethodTriggerFormName returned the current form name and in 4.1 returned null. Your situation is different, you execute the method on click in tree. Here, if context is null (global) application.getMethodTriggerFormName will return null and if context is the form’s name will return that. I don’t think we would/can change that because we don’t have access to current form from plugin. You can send a state argument to the method to differentiate between different calls in this case.

Tnx Laurian, good to know that.

ok, tnx at all for the answers