• 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: Window OnVisible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window OnVisible


  • Subject: Re: Window OnVisible
  • From: vance <email@hidden>
  • Date: Fri, 5 Oct 2007 21:34:42 -0700

Thanks, I am trying to do some memory intensive processing when the window shows up and then release all the memory when the window disappears (is closed)

Does that mean I have to keep track of the window state myself? (for example, before makeKeyAndOrderFront is called, I should set a variable bVisible = YES and set bVisible = NO on the NSWindowDidExposeNotification notification handler, and only run my code when there is a transition from NO to YES inside the NSWindowDidExposeNotification handler)

Also, is there an easy way for Interface Builder NOT to create an instance of this NSWindow class, and let me create the instance and set the outlet myself, on demand, when the window is needed. (that way I could put this code inside init)

I am new to cocoa and mac development so I am not very sure of the best way to implement this.

-Vance

On Oct 5, 2007, at 6:50 PM, Scott Thompson wrote:


On Oct 5, 2007, at 6:44 PM, vance wrote:

What method should I override, or to what notification should I subscribe to know when a window gets shown on the screen (goes from hidden to visible). In other words the opposite of NSWindowWillCloseNotification

Your best bet is probably NSWindowDidExposeNotification, but that notification may be called for other reasons as well.


Scott


_______________________________________________

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: 
 >Window OnVisible (From: vance <email@hidden>)
 >Re: Window OnVisible (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: Window OnVisible
  • Next by Date: Re: problem loading a window in a new NIB using NSWindowController.
  • Previous by thread: Re: Window OnVisible
  • Next by thread: Re: Window OnVisible
  • Index(es):
    • Date
    • Thread