Window controllers, code obfuscation
Window controllers, code obfuscation
- Subject: Window controllers, code obfuscation
- From: "Sumner Trammell" <email@hidden>
- Date: Tue, 19 Aug 2008 03:20:07 -0400
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@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