我想edit
从类main调用在窗体内声明的方法的值。我该怎么做?
[Form]
public class AdvancedCustomerSchedule extends FormRun
{
Sorting sorting;
edit Sorting edtSorting(boolean set, Sorting _sorting)
{
if (set)
{
sorting = _sorting;
}
return sorting;
}
}
和班级:
class AdvancedCustomerScheduleService
{
static void main(Args args)
{
//I want to call the method edtSorting here.
}
}
更新
FormRun callerForm;
if (args.caller() is FormRun)
{
callerForm = args.caller() as FormRun;
if (formHasMethod(callerForm, identifierStr(edtSorting)))
{
str test = callerForm.edtSorting();
info(test);
}
}
通常,对于调用在表单上定义的方法,通常使用如下模式:
...
FormRun callerForm;
...
if (_args.caller() is FormRun)
{
callerForm = _args.caller();
if (formHasMethod(callerForm, identifierStr(someMethod)))
{
callerForm.someMethod();
}
...
以类DirPartyContactInfoFormHandler
及其静态main
方法为例。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句