Re: [Pyobjc-dev] How to get NSDoc subclass's window outlet?
Brought to you by:
ronaldoussoren
From: David E. <epp...@ic...> - 2002-12-15 17:41:19
|
On 12/15/02 9:32 AM -0500 bb...@ma... wrote: > Generally, you never should or need to access an instance variable of > AppKit classes directly, even when subclassing. An accessor method is > almost always provided. > > In this case, NSDocument implements the -window method for exactly this > purpose. > > Try self.window(). > > If that doesn't work, then there is a bug. It doesn't work. exception: No attribute window window() is also not documented in the AppKit API reference although setWindow:() is there (with a note saying don't call it). self.windowControllers()[0].window() works though. -- David Eppstein UC Irvine Dept. of Information & Computer Science epp...@ic... http://www.ics.uci.edu/~eppstein/ |