Hello,
I was having this problem but I resolved it after much trial and error.
I have a tab on a window and I wanted each user object tabpage within the tab to refer to a windows function. I have several user object datawindows on each tabpage and I want them all to have the same data and properties so I use the window to keep them in synch.
To do that, each tab page declares and instance variable of that that window object. When I open the window, I set the instance variables for each tab page to "this", for example
tab_1.tabpage_1.i_parentwindow = this
tab_1.tabpage_2.i_parentwindow = this
......
The tabpages can refer to i_parentwindow to communicate with each other.
My problems started when I started doing this. I could not edit the source for any user object tab page and save it - and worse, the user object would get deleted no matter what I did, even if I declined to save it after getting the error. Sometimes I could and I thought I had it solved but the problem would always come back randomly.
Then I took out this instance variable and simply had the user objects refer to the window object rather than an instance variable. When I open the window, I open the Window object rather than declare an instance of it and open an instance. I can no longer open multiple instances of that window but I don't need to do that.
There is probably a more elegant way to accomplish what I want but this is now working well and without error.
With this approach, you do not utilize the default global window variable (w_xxxxx), which allows multiple instances of the window to exist, and you avoid the issue using the "this" pronoun.