• 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: Are views active or inactive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are views active or inactive?


  • Subject: Re: Are views active or inactive?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 22 Dec 2009 21:51:03 -0600

On Tue, Dec 22, 2009 at 9:45 PM, Rick Mann <email@hidden> wrote:
> I'm listening for that notification. Sure is a clunky way to do things. I've never used a view framework that didn't tell views when they became active/inactive.

Views don't become (in)active, windows do. Since there are plenty of
things that might be interested in that (Window menu, controllers,
views…), it's done as a notification so all interested parties can
listen for it.

> I'm not sure viewDidMoveToWindow works here. I'm using it already for something else, and it gets called 3 times when my window is created, but never when activated.

This surprises you? It's called -viewDidMoveToWindow after all. You
would start listening for all window change notifications there, and
then your view's notification handler would check to see if its window
is the one being notified about and update its drawing accordingly.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Are views active or inactive?
      • From: Rick Mann <email@hidden>
References: 
 >Are views active or inactive? (From: Rick Mann <email@hidden>)
 >Re: Are views active or inactive? (From: Kyle Sluder <email@hidden>)
 >Re: Are views active or inactive? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Are views active or inactive?
  • Next by Date: Re: Are views active or inactive?
  • Previous by thread: Re: Are views active or inactive?
  • Next by thread: Re: Are views active or inactive?
  • Index(es):
    • Date
    • Thread