• 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
Unit Tests - mainWindow, keyWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unit Tests - mainWindow, keyWindow


  • Subject: Unit Tests - mainWindow, keyWindow
  • From: "steven Hooley" <email@hidden>
  • Date: Mon, 3 Mar 2008 13:25:23 +0000

When running my application's tests i cannot figure out why the NSWindow and
NSApplication properties relating to the keyWindow and  mainWindow (and
others that depend on them, like NSDocumentController's currentDocument) are
always null.


I have my application configured as the 'Test Host' for it's corresponding
unit test bundle. Building the tests causes the app to launch, finish
launching and run the tests. The app's icon appears in the dock while it is
running and it's runloop runs.  The tests run on the application's main
thread. From a test i can create, display and order an NSWindow but i can
not make it become the mainWindow or the keyWindow.


If i run the application and inject the tests via XCInjectBundle everything
works as expected. Any insight into how and why these two routes differ is
much appreciated.

thanks
_______________________________________________

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

  • Prev by Date: Re: Returning values from objc_msgSend etc
  • Next by Date: Re: Spotlight importer for records
  • Previous by thread: Re. Cascading windows in document architectures
  • Next by thread: displaying image and multiple rows of text in NSTableView row
  • Index(es):
    • Date
    • Thread