“this” vs. “element” keyword in X++

杀马特。学长 韩版系。学妹 提交于 2019-12-03 10:54:34
Allan Iversen

this can be used in any objects to reference the current object and member methods.

MorphX forms and reports are composite objects.

In forms the collection of objects is contained within a FormRun object. You can reference members in the outer FormRun object by using the element reference.

If your code is placed at the top level there are no functional difference between this and element.

If your code is placed in a FormDataSource this will reference the datasource but element will reference the FormRun.

"This" can be used only refers to the same class objects but "element" is access the form methods into any form level(like datasouce level,design level)if the functionality of method is same we can use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!