Hi, I'm trying to decipher someone else's code who is no longer
available.  He did something that I think I can simplify, but I first
want to make sure I'm not being completely wrong-headed about what I'm
looking at.



He does the following in his MyDocument.m file:

- (void)windowControllerDidLoadNib:(NSWindowController *)aController
{       
        
        NSWindow* window = [[[self windowControllers] objectAtIndex:0] window];
        [[window windowController] setShouldCascadeWindows:NO];
        
.
.
.
}


In English:

He grabs a reference to the array of window controllers from the
document object.
He grabs the first window controller from that array.
He grabs the window from that window controller.
He sends a message, setShouldCascadeWindows:NO, to that window's
window controller.



Unless I'm being completely stupid about this, he could have done this, right?

[[[self windowControllers] objectAtIndex:0] setShouldCascadeWindows:NO];
        

Or better yet, this?

[aController setShouldCascadeWindows:NO];



Thanks,
-s
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to