Это ссылка.
Создаем класс:
PHP код:
class One
{
int one;
}
методы:
PHP код:
void setVar(int _one)
{
;
one = _one;
}
PHP код:
void sayOne()
{
print One;
pause;
}
PHP код:
void call()
{
MenuFunction menuItem = new MenuFunction (menuItemDisplayStr (Two), MenuItemType::Display);
Args arg = new Args();
;
One = 1;
arg.caller(this);
menuItem.run(arg);
print "Yes";
pause;
this.sayOne();
}
В init вызываемой формы пишем следующее:
PHP код:
public void init()
{
One var;
;
super();
var = element.args().caller();
var.sayOne();
var.setVar(199);
}
И job:
PHP код:
static void Job1(Args _args)
{
One one = new One();
;
one.call();
}
Видим, что изменение переменной класса, сделанное в форме видно и из самого класса. Вывод - это ссылка.