i've added NSLogs to both methods i've listed, and while it's the windowControllerDidLoadNib: method that launches the app with the first view within the viewControllers array (objectAtIndex:0), the console will print "windowControllerDidLoadNib method called" after it prints "displayViewController method called". so displayViewController is called first, then windowControllerDidLoadNib, AND what i find very strange is that windowViewControllerDidLoadNib actually called displayViewController to set up the view, but the console doesn't log it being called afterwards.
additionally, "box" and "popUp" are also IBOutlets, which get called fine in the displayViewController method, but i just can't get the actual window's IBOutlet to get called at launch to change it's title... On Sun, Nov 8, 2009 at 6:40 PM, Graham Cox <graham....@bigpond.com> wrote: > But you're merely guessing. Try stopping in the debugger and PROVE whether > the method gets called. > > There's also the strong possibility that something else changes the title > after your code does, so you need to find out about that also. > > The first time you can be sure that an outlet actually points to what you > think it does is at -awakeFromNib time. If you're using the outlet prior to > that, all bets are off. > > --Graham > > > > On 09/11/2009, at 6:48 AM, Chunk 1978 wrote: > >> haven't tried that. i guess i'm struggling with the idea of >> initiating objects before use. currently (i hope i'm correct) i >> believe that IB objects which have IBOutlets do not need to be >> initiated in code prior to use, as the connected outlet has already >> created a context to the object. so if i create an IBOutlet to the >> window, and set the title of that window during a method that is >> called during launch, shouldn't the code change the title of the >> window? >> >> On Sun, Nov 8, 2009 at 1:21 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: >>> >>> On Nov 8, 2009, at 10:05 AM, Chunk 1978 <chunk1...@gmail.com> wrote: >>> >>>> the method does get called at launch, so that is why i don't >>>> understand why the window isn't setting it's title. i've even moved >>>> the code to set the window title to - >>>> (void)windowControllerDidLoadNib:(NSWindowController >>>> *)windowController with no luck. also, i've added an IBOutlet to the >>>> window with no luck. the window will always launch as "untitled" and >>>> only switch to it's appropriate title when the popup menu is toggled. >>> >>> Have you remembered to override -synchronizeWindowTitleWithDocumentName? >>> >>> --Kyle Sluder > > _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com