Copy link to clipboard
Copied
I'm writing a function to get screen position by entering container object and client position,
I have a problem. When I "container object. Parent. Parent", VSC will generate a new window object every time it is debugged
If I can't use. Parent (), do I have any other way to write this function?
I found a problem
It is not the continuous use of. Parent, but the use of "Window" related operations (for example, if (XXX instanceof Window) {XXX}, VSC will generate a new window every time it is called,
Copy link to clipboard
Copied
.parent() refers to a UI layout group or property group. If you don't structure your code suitably, of course just daisy-chaining multiple such calls together won't do anything. Maybe you should re-read the scripting guide on how to address property groups and/ or create UI layouts. You haven't really offered any useful info, anyway, like explaining what you are actualyl trying to do or providing the complete code, so nobody can advise specifically.
Mylenium
Copy link to clipboard
Copied
Sorry, I recorded a video to illustrate my problem.
https://www.bilibili.com/video/BV16r4y1k747/
Copy link to clipboard
Copied
I found a problem
It is not the continuous use of. Parent, but the use of "Window" related operations (for example, if (XXX instanceof Window) {XXX}, VSC will generate a new window every time it is called,