• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trust, but verify - OCUnit testing of Target-Action Connections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Trust, but verify - OCUnit testing of Target-Action Connections
      • From: "David H. Silber" <email@hidden>
References: 
 >Trust, but verify - OCUnit testing of Target-Action Connections (From: "David H. Silber" <email@hidden>)

  • Prev by Date: create custom control same as multiple monitor control that manages monitors windows
  • Next by Date: Re: dragging images to the finder
  • Previous by thread: Trust, but verify - OCUnit testing of Target-Action Connections
  • Next by thread: Re: Trust, but verify - OCUnit testing of Target-Action Connections
  • Index(es):
    • Date
    • Thread