Picture of Fabio Beoni
Re: this.setCompletionStatus() undefined
by Fabio Beoni - Wednesday, 4 January 2017, 9:16 AM
 

Hi,

I mean, "this" doesn't have a "setCompletionStatus". The invocation happen in a method defined in the component definition. The key "this" doesn't return the component it-self, it returns the global window object. But I think it depends because the completeComponent() function is invoked as callback of a "onClick" event in Google Map marker.

I changed the code by calling the component differently. Thanks.

var component = ComponentView.extend({

completeComponent:function () {
    //this.setCompletionStatus();

     component.setCompletionStatus();
}

});