Re: override hide on deactivate?
Re: override hide on deactivate?
- Subject: Re: override hide on deactivate?
- From: Andy Lee <email@hidden>
- Date: Sun, 14 Dec 2008 08:48:27 -0500
On Dec 14, 2008, at 7:26 AM, Chunk 1978 wrote:
do you mean:
-=-=-=-=-
- (BOOL)hidesOnDeactivate
{
[self setHidden:YES];
return NO;
}
-=-=-=-=-
?
That wouldn't work, because setHidden: is an NSView method and
presumably you're overriding hidesOnDeactivate in an NSWindow subclass.
From a quick test, it seems that hidesOnDeactivate is not called
every time the app deactivates, as I think you're assuming. It's only
called once or twice as the window is set up.
If you need something to happen when the app activates or deactivates,
you could either implement the corresponding application delegate
methods or register for the corresponding notifications. See
applicationWillBecomeActive: and applicationWillResignActive:.
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden