Community
Participate
Working Groups
I've seen the Control.view made as public along with proper comments saying that it should not be used. Will it be possible to make Shell.window public with similar comments? It would be really helpful for me in fixing Bug# 201696. Right now, I'm using reflection to access that field (patch available in that bug).
You can always get at the NSWindow of a Control by calling view.window(), which is public on NSWindow. I'd like to avoid making any more fields public. If it returns null the NSView hasn't been parented to a NSWindow yet. All of the usual caveats apply there about accessing the 'view' field, but at this point I highly doubt we would rename or otherwise change that.
BTW, the 'view' field of a Shell is the content view of the window, so it will always be set.
Thanks Scott. view.window() works fine for me