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();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.