Hi All,

I am trying to access variables defined at assistant level in event handlers which are a part of the same assistant as well. When I access the assistant level variables in an event handler, I get it as undefined. However, the variables are accessible in the setup function.

For reference, have a look at the Code below:

Code:
function MyTestAssistant(passedValue)
{
    this.passedValue = passedValue;
}

MyTestAssistant.prototype.setup = function()
{
    Mojo.Log.info("Passed Value Is: " + this.passedValue); // Prints the value set in Constructor
}

MyTestAssistant.prototype.testListTapHandler = function(event)
{
    Mojo.Log.info("Passed Value Is: " + this.passedValue); // Logs undefined
}
Anyone else is having this issue or I am doing something wrong here. Is it possible to access the variables in handler or we have think of workarounds to achieve it.

Looking forward to get a reply soon.

Thanks and Regards,

Muhammad Haseeb Khan