caller in args
来源:互联网 发布:电气行业设计软件 编辑:程序博客网 时间:2024/06/15 18:25
First let learn what is a args:
The Args class is used to pass arguments to a class-constructor. Args can pass information such as name, caller, and parameters to a new class.
Forms, reports and queries all use this class as their first argument in the constructor. The preferred way to use this class is to construct an Args object, supplying a name-string, and then pass this Args object to the forms constructor or a ClassFactory Class method.
If you need to refer to the Args object passed to one of these classes, it can be reached using that class' args() method.
There are four methods that can be used to pass extra information to the new class:
· Args.parm Method - for passing strings
· Args.parmEnum Method and Args.parmEnumType Method - for passing enums
· Args.parmObject Method - for passing an object of any type.
For example:
{
Args a = new Args("CustTable");
formRun fr = ClassFactory.FormRunClass(a);
fr.init();
fr.run();
}
Caller:
public Object caller([Object value])
while your call a form or report via a menu item the system will pass it automatically,in the called form you can use method like this to access it:
Object _object;
_object = element.args().caller();
You can also use the caller manually.For example:
In a class,there is a methos:
Public void demo()
{
Args args;
FormRun formRun;
;
Args = new Args(FormStr(“myformname”));
Args.caller(this);
Formrun = classFactory.formClassRun(args);
Formrun.init();
Formrun.run();
Formrun.wait();
}
When this method is called ,the form:myformname ran.And in this running form:myformname we can access the class whick called this form like this:
void init()
{
Object _object;
;
Super();
_object = element.args().caller();
//then we can use methods in the class:
_object.methodname();//when you press the’.’the method name will not automatically appear.
}
this is very usefull when you have a variable or any other things in a Form A,and you need the Form B modify this variable ,but after the Form B modified the variable you need use this variable in Form A.
for example in form A you have a class classa which hold those usefull variables,you use the classa call the form b,and pass classa as a caller,after the form b modified the classa the form b closed,then you can access those variables in the classa in form a.
- caller in args
- Args in class constructor
- args
- 如何在python中使用*args,**kwargs (How to use *args and **kwargs in Python)
- How to use *args and **kwargs in Python
- How to use *args and **kwargs in Python
- Django: Filter ModelChoiceField by user(or other args in view)
- javascript caller
- caller 方法
- Function.caller
- callee caller
- python func defaults args are evaluated only once,(in definition time)
- 关于APKsmail中加入代码报错All register args must fit in 4 bits
- 读thinking in java的收获(三)--用eclipse输入main中args运行参数
- MATLAB编译c++出错的解决办法(Error in compile (line 439) mex(args{:});)
- thingking in java test2.11练习(10)以及IDE中args的提前输入
- args参数
- shell args
- RFC2046 多用途Internet邮件扩展(多用途网际邮件扩充协议(MIME))
- .NET面试题目
- 初来咋到
- RFC2554 SMTP服务认证扩展
- 关于省、市、县无刷新连动
- caller in args
- Java编程容易犯的21种错误(长春JAVA工程师培训 长春计算机培训学校 长春IT就业培训学校)
- javascript实现播放器
- Squid2.5-2.6的改进以及反向代理实现Web缓存加速
- ToolTip的应用技巧收集
- office word2003文档权限管理操作视频
- java.io.Serializable
- GridView的编辑方法
- 一个你看了会哭的故事