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:
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.
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden