Properly done you can make a shadowed property work
make a new CLASS
set its super to WINDOW
in your class add a computed property for TOP
in the GETTER put
return Window(self).Top
in the SETTER put
Window(self).Top = value
set the SUPER of the window you want tooth’s new class name
put break points in the new class getter & setter
PROPERLY done most of the time you can get away with this kind of shadowing
Anything else can cause issues
Some things in the Xojo framework do NOT use the properties like you’d expect (like control locking doesnt set LEFT TOP HEIGHT or WIDTH - it seems to reach in behind the scenes) and there is no way shadowing like this can help
And, sadly, moving the window by dragging it doesnt set these properties either. But if you set TOP in code it does
If one needs to know when a window was dragged (or close to it), one way might be to save the top value and use a short timer to check if it changed…though that seems an expensive way to do it.
Oh you can intercept some of the events & use that
Its just the underlying framework code seems to reach into the guts of the low level Window class and not use the properties that are exposed
So a computed wont see those change like you might surmise
Back when the documentation was cleaner/better I’d go through a random class every now and then just to see what I’ve overlooked or forgotten. Easy enough to do since the framework is rather larger.
Hack into the XOJWindow’s delegate class and override windowDidMove: You might be able to stack trace from there.
Yes it can be done in native Xojo with declare, a buttload of declares. I think it may be part of my AppKit, or if not, it does include a template for overriding these functions.