How to track all window creation?
How to track all window creation?
- Subject: How to track all window creation?
- From: "v. Anderson Wiese 2" <email@hidden>
- Date: Sun, 25 Feb 2007 15:11:23 -0600
Hi All,
I'm new to Cocoa, and trying to host some cocoa code inside a carbon
app. I want to do some bookkeeping every time a cocoa window is
created (I may not know when or what windows are created by the
client code). I am hoping to find a way to intercept some message to
the NSWindow class, whether the window is loaded from a nib,
constructed directly, or whatever other methods there may be that I
don't know about.
My first effort was to use poseAsClass to replace NSWindow with a
subclass that overrides init, but I was surprised to find that init
is not called when a window is loaded from a nib. So I am now doing
the same thing with both init and awakeFromNib. This seems like it
might work, but I worry that client code may implement awakeFromNib
and not call up to the superclass.
Is there a better or more dependable way to do this?
Thanks!
Andy
---------------------
"there is nothing -- absolutely nothing -- half so much worth doing
as simply messing about in boats."
--The Wind in the Willows
_______________________________________________
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