Re: How to track all window creation?
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