Unit Tests - mainWindow, keyWindow
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