setData isn't recognized as a function.

I'm posting this on behalf of a friend who I'm working along in a game, but we had encountered a problem.

I just want setData to be called as a function for the PartyMembersWindow object type or for the variable partyMembersColumn object to call setData in the first code block but for some reason even if i defined setData the exact same way with selectPartyColumn for partyMembersColumn it doesn't detect it as a function.

For selectPartyColumn the function setData in the second code paste works! the function "setData" is called and defined but then for partyMembersColumn the setData is not defined at all and i defined it exactly the same as the way i defined setData for selectPartyColumn and i have no idea why.

Code:
Scene_PartyCreator.prototype.createSelectPartyColumn = function() {
        this._selectPartyColumn = new SelectPartyWindow(0, Graphics.height/8, Graphics.width/3, Graphics.height*(7/8));
        console.log("This is suppose to be the method for selectPartyColumn Object: ");
        console.log(this._selectPartyColumn.setData);
        console.log(this._selectPartyColumn);
        this._selectPartyColumn.setData(this._partyList);
        this._selectPartyColumn.setHandler('ok', this.onPartyOk.bind(this));
        this._selectPartyColumn.setHandler('cancel', this.onTestCancel.bind(this));
        this.addWindow(this._selectPartyColumn);
    };

    Scene_PartyCreator.prototype.createPartyMembersColumn = function() {
        this._partyMembersColumn = new PartyMembersWindow(Graphics.width/3, Graphics.height/8, Graphics.width/3, Graphics.height*(7/8));
        console.log("This is suppose to be the method for partyMembersColumn Object: ");
        console.log(this._partyMembersColumn.setData);
        console.log(this._partyMembersColumn);
        this._partyMembersColumn.setData($gameParties.getParty(1));
        this._partyMembersColumn.setHandler('cancel', this.onLustrousCancel.bind(this));
        this.addWindow(this._partyMembersColumn);
    };

Code:
SelectPartyWindow.prototype.initialize = function(x, y, width, height) {
        Window_Selectable.prototype.initialize.call(this, x, y, width, height);
        this._data = $gameParties.parties();
        console.log(this._data);
        this.refresh();
    };
    
    SelectPartyWindow.prototype.setData = function(data) {
        if (this._data !== data) {
            this._data = data;
            this.refresh();
        }
    };

Code:
PartyMembersWindow.prototype.initialize = function(x, y, width, height) {
        Window_Selectable.prototype.initialize.call(this, x, y, width, height);
        this._data = $gameParties.getParty(1);
        this.refresh();
    };
    
    // TODO: Somehow this isn't a function...
    PartyMembersWindow.prototype.setData = function(data) {
        console.log("Setting data for party members window");
        console.log(data);
        if (this._data !== data) {
            this._data = data;
            this.refresh();
        }
    };

Console logs:

Code:
This is suppose to be the method for selectPartyColumn Object:
PartyCreator.js:130 ƒ (data) {
        if (this._data !== data) {
            this._data = data;
            this.refresh();
        }
    }

Code:
This is suppose to be the method for partyMembersColumn Object:
PartyCreator.js:141 undefined

for the SelectPartyColumn object, here setData exists as a function
unknown.png


this is for PartyMembersColumn object, and here it shows that setData also exists
unknown.png


but somehow it says "undefined" in the console log
and gave the error:
unknown.png

Original thread: https://forums.rpgmakerweb.com/threads/setdata-isnt-recognized-as-a-function.105755/