0
Отвечен

Sender in ScriptCall macro

Wouter van der Post 7 лет назад в Приложения / i3 Pro обновлен Tatiana Kiselyova (expert) 7 лет назад 3

Hello,


In the latest changelog it says:

ScriptCall macro.When calling the function the reference to the item which called the function is transferred in the script

Can you elaborate on this? How do we use this new feature?

I've tried to create a function with a parameter like so:

function doSomething(sender) {
  IR.Log(sender.Text);
}

And created a simple button that calls this function on it's Press Event.

But 'sender' is undefined.

+2
Ожидает ответа пользователя

Hello.
When a function is called, the reference to the element that calls the function is passed through this construct:

function text(){
   IR.Log(this.GetState(0).Text);
};

Сервис поддержки клиентов работает на платформе UserEcho