Hello all, I have a test case where I would like to launch a UI. I have a NIB with a window that I load through code in the test case. Here goes the code :
- (void)testExample { NSArray* topLevelWidgets = nil; NSBundle* theBundle = [NSBundle bundleForClass:[self class]]; [NSApplication sharedApplication]; Boolean nibLoaded = [theBundle loadNibNamed: @"TestSetOne" owner: [NSApplication sharedApplication] topLevelObjects: &topLevelWidgets]; if (!nibLoaded) XCTFail(@"NIB file was not loaded"); [[NSApplication sharedApplication] runModalForWindow:[topLevelWidgets objectAtIndex:2]]; } Problem is that the last line does not cause the window in the NIB to appear. If I run the code through the debugger I can see the NSWindow instance that I am passing to the “runModalForWindow”. What am I doing wrong ? Regards _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com