On Jan 11, 2009, at 2:49 PM, David H. Silber wrote:

I have created a trivial Cocoa Application, with trivial model and
controller classes, and with a view built in Interface Builder.  The
application changes its window title when its button is pressed, so it
obviously can load its window and is able to send messages to it.

I can't test it though, because I'm unable to get the window loaded
by/for the tests. The -testWindowLoading test, which I swiped from Mr.
Hanson's article fails.

It's failing because while you created an NSWindowController subclass to manage your window, you didn't actually create a nib to go along with it. Instead, you're just re-using your application's nib.

A window controller should be File's Owner of the nib containing its window, and should have its window outlet set to refer to the window in the nib file.

  -- Chris


_______________________________________________

Cocoa-dev mailing list ([email protected])

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]

Reply via email to