On 30 Jul '08, at 9:51 PM, Sumner Trammell wrote:
but it doesn't work. I get *** -[MyDocument window]: unrecognized selector sent to instance 0x1613ab30 in the run log. aSender is the WebView in the main window. self is the MyDocument object, and it has a window outlet that I can see when I right-click the File's Owner in IB.
Look at your code. You tried to send -window to a MyDocument object, which is a subclass of NSDocument:
[[self window] addChildWindow:[aSender window] ordered:NSWindowAbove];
There is no such method (because documents can have multiple windows, so there's no sensible result.)
You must have gotten a warning about this at compile time. *Do not ignore such warnings*. They should be treated as error messages because, nearly always, they indicate a situation that will throw an exception at runtime, causing your app to fail. I recommend turning on the "treat warnings as errors" build config checkbox.
—Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]