• 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: How to track all window creation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to track all window creation?


  • Subject: Re: How to track all window creation?
  • From: Mark Ritchie <email@hidden>
  • Date: Sun, 25 Feb 2007 21:00:22 -0500

On 25-Feb-07, at 6:07 PM, Uli Kusterer wrote:
The problem is that NSWindow doesn't really implement init. Its designated initializer is one of the its two initXXX methods. You'd have to override that one. They only call *super*'s init method.

On 25-Feb-07, at 4:11 PM, v. Anderson Wiese 2 wrote:
... window is loaded from a nib ...

Catching the init methods will tell you when new window objects are created. However, they won't get called when a window object is unachived from a nib file. In that case, the initWithCoder: method is called.


More information on unarchiving is available here:
http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/ index.html


Depending on what you're trying to track, you might also consider catching some of the notification methods which are posted by windows. That may help you differentiate between windows which actually appear on screen and those which don't.

Good luck!
Mark
__
Mark Ritchie
Cocoa and WebObjects Developer
Diamond Lake Consulting Inc.
Toronto, Ontario, Canada



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >How to track all window creation? (From: "v. Anderson Wiese 2" <email@hidden>)
 >Re: How to track all window creation? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Parsing STDout into an NSDictionary
  • Next by Date: Making a application active with NSStatusMenus
  • Previous by thread: Re: How to track all window creation?
  • Next by thread: Making a application active with NSStatusMenus
  • Index(es):
    • Date
    • Thread