Re: Trust, but verify - OCUnit testing of Target-Action Connections
Re: Trust, but verify - OCUnit testing of Target-Action Connections
- Subject: Re: Trust, but verify - OCUnit testing of Target-Action Connections
- From: Chris Hanson <email@hidden>
- Date: Sun, 11 Jan 2009 21:56:19 -0800
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@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:
This email sent to email@hidden