EVENT_ITEM_CHANGE not send text value

Q:
I have a project with:
 - 1 Page with name "Eventi"
 - 4 EditBox with name in page
 - 1 Sound with name "beep.wav"

I need play a sound when text property of one item change and text is "1".
I write in JS this code


var Eventi;

IR.AddListener(IR.EVENT_START, 0, function()
{
   Eventi = new Alarm();    
});

function Alarm()
{
   var ItemList = ["Item 4","Item 1","Item 2","Item 3"];
   var Page = IR.GetItem("Eventi");
   
   for(i=0;i<ItemList.length;i++)
   {
      IR.Log("Generazione evento item "+ItemList[i]);
      IR.AddListener(IR.EVENT_ITEM_CHANGE, Page.GetItem(ItemList[i]),function (text)
      {
            if(text = "1")
            {
               IR.PlaySound('Alarm.mp3');   
            }
      });
   } 
};


I run this code with some Log istruction and i see that when i change text on the object, the variable "text" in JS is always "undefined".

This is a bug or I wrong something?

A:
Please try this project.

FullAccessDataItemforListener.irpz

Is this article helpful for you?