• 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
Window controllers, code obfuscation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Window controllers, code obfuscation
      • From: Charles Steinman <email@hidden>
    • Re: Window controllers, code obfuscation
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: document based app, custom ibaction
  • Next by Date: Re: document based app, custom ibaction
  • Previous by thread: Re: Deploying project as backward compatible
  • Next by thread: Re: Window controllers, code obfuscation
  • Index(es):
    • Date
    • Thread