jeudi 19 janvier 2012

Call a method on caller form

Sometimes you need to call a function on the calling form. You can use the following code to accomplish this.

element.args().caller().();

For example

element.args().caller().GS_Refresh();


The problem with the code above is that you don't get any compilation errors if the method doesn't exist. To handle this problem, you can use the following code.

if (formHasMethod(element.args().caller(), identifierStr(GS_Refresh)))
{
element.args().caller().GS_Refresh();
}

Aucun commentaire:

Enregistrer un commentaire