Strange result for return of index nbr

Hello,

Im trying to obtain the _index value of a certain window..
in some case i get the vale.. but somethines it returns.. undefined...

img1 console.log shows the window _index value = 3 // var id = this._LonerWindow;
img2 console.log shows the window _index value = undefined // var id = this._LonerWindow.index();

img3 console.log shows the window _index value = 0 // var id = this._statusWindow;
img4 console.log shows the window _index value = 0 // var id = this._statusWindow.index();

method is similar but i cannot extract the index value i need...

one thing that might cause this problem is ... _LonerWindow construction: // this.createLoneryWindow(this._statusWindow);

could this cause the problem on extracting the value ?
and is there another way to obtain it ?
The _index property is not common to all windows. Reading rpg_windows.js shows that the _index property is set by Window_Selectable.prototype.initialize. The index method is also found on Window_Selectable.prototype.

Does Window_LonerMembers have Window_Selectable.prototype in its prototype chain? Does Window_LonerMembers also call Window_Selectable.prototype.initialize to setup the _index property?
Well this is how its set up..
Doesn't see anything strictly wrong except for the missing windowWidth and windowHeight methods. I assume those are outside the screen shot. I guess I'd need to see a more complete example.
Yes they are..

Well i cound find a solution comparing code line of other doing what im doing.. as the never have to get the _index..
So i make a work around using a game variable to store then extract that information..
This works fine but i would rater find why it doesn't work as expected..

Original thread: https://forums.rpgmakerweb.com/threads/strange-result-for-return-of-index-nbr.89583/