• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: override hide on deactivate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >override hide on deactivate? (From: "Chunk 1978" <email@hidden>)
 >Re: override hide on deactivate? (From: Graham Cox <email@hidden>)
 >Re: override hide on deactivate? (From: "Chunk 1978" <email@hidden>)

  • Prev by Date: Re: Cocoa equivalent of std::vector<MyType> ?
  • Next by Date: Re: Cocoa equivalent of std::vector<MyType> ?
  • Previous by thread: Re: override hide on deactivate?
  • Next by thread: Rather than NSWorkspaceDidUnmountNotification?
  • Index(es):
    • Date
    • Thread