Re: windowDidLoad not getting called

2015-03-20 Thread Bill Cheeseman
> On Mar 20, 2015, at 5:21 AM, Ken Thomases wrote: > > On Mar 20, 2015, at 3:54 AM, Bill Cheeseman > wrote: > >> My launch sequence goes like this: My Info.plist file designates MainMenu as >> the application's principal nib file. My MainMenu nib file names >> N

Re: windowDidLoad not getting called

2015-03-20 Thread Ken Thomases
On Mar 20, 2015, at 3:54 AM, Bill Cheeseman wrote: > My launch sequence goes like this: My Info.plist file designates MainMenu as > the application's principal nib file. My MainMenu nib file names > NSApplication as file's owner, it contains the menu bar and my archived > appDelegate object, a

Re: windowDidLoad not getting called

2015-03-20 Thread Bill Cheeseman
> On Mar 19, 2015, at 5:29 PM, Ken Thomases wrote: > > Marking the window Visible at Launch obviously can't trigger the loading of > the NIB, since it's a setting that's stored in the NIB. Yes, I lost my focus when I said that and incorrectly conflated the loading and the showing of the wind

Re: windowDidLoad not getting called

2015-03-19 Thread dangerwillrobinsondanger
> On 2015/03/20, at 6:59, Sean McBride wrote: > > On Thu, 19 Mar 2015 21:21:30 +, Quincey Morris said: > >> ― Never, ever use “visible at launch” on any window that has a window >> controller. > > That'd be a nice thing to assert() in my window controllers... but I just > don't see any g

Re: windowDidLoad not getting called

2015-03-19 Thread Sean McBride
On Thu, 19 Mar 2015 21:21:30 +, Quincey Morris said: >— Never, ever use “visible at launch” on any window that has a window >controller. That'd be a nice thing to assert() in my window controllers... but I just don't see any getter for it... :( Cheers, -- _

Re: windowDidLoad not getting called

2015-03-19 Thread Ken Thomases
On Mar 19, 2015, at 3:39 PM, Bill Cheeseman wrote: > I believe you're mistaken when you say that the "Visible at Launch" setting > doesn't result in a call to -windowDidLoad. I'm using it now in a rewrite of > my UI Browser product, and it triggers -windowDidLoad exactly as I expected. A windo

Re: windowDidLoad not getting called

2015-03-19 Thread Quincey Morris
On Mar 19, 2015, at 13:39 , Bill Cheeseman wrote: > >> On Mar 19, 2015, at 3:54 PM, Ken Thomases > > wrote: >> >> That doesn't help with getting the window controller's -windowDidLoad method >> called. In fact, that setting almost never helps with anything and, in

Re: windowDidLoad not getting called

2015-03-19 Thread Bill Cheeseman
> On Mar 19, 2015, at 3:54 PM, Ken Thomases wrote: > > That doesn't help with getting the window controller's -windowDidLoad method > called. In fact, that setting almost never helps with anything and, in my > opinion, should generally be off. Turning it on just takes control away from > th

Re: windowDidLoad not getting called

2015-03-19 Thread Dave
I fixed it, it was calling loadWindow directly, I won’t let that one bite me again! > On 19 Mar 2015, at 19:49, Bill Cheeseman wrote: > > >> On Mar 19, 2015, at 2:34 PM, Ken Thomases wrote: >> >> To force the window controller to load the window, request its "window" >> property value or

Re: windowDidLoad not getting called

2015-03-19 Thread Ken Thomases
On Mar 19, 2015, at 2:49 PM, Bill Cheeseman wrote: > On Mar 19, 2015, at 2:34 PM, Ken Thomases wrote: >> >> To force the window controller to load the window, request its "window" >> property value or call -showWindow: on it (if you want to show the window). > > Or set "Visible at Launch" in

Re: windowDidLoad not getting called

2015-03-19 Thread Bill Cheeseman
> On Mar 19, 2015, at 2:34 PM, Ken Thomases wrote: > > To force the window controller to load the window, request its "window" > property value or call -showWindow: on it (if you want to show the window). Or set "Visible at Launch" in the window controller's nib file, at least if you don't ha

Re: windowDidLoad not getting called

2015-03-19 Thread Ken Thomases
On Mar 19, 2015, at 1:24 PM, Dave wrote: > The Window Controller is instantiated with this code: > > myWindowController = [[LTWWindowControllerX alloc] initWithWindowKind:@""]; > [myWindowController loadWindow]; You shouldn't call -loadWindow. -loadWindow is an override point. See the docs f

Re: windowDidLoad not getting called

2015-03-19 Thread Michael Babin
> On Mar 19, 2015, at 1:24 PM, Dave wrote: > > The Window Controller is instantiated with this code: > > myWindowController = [[LTWWindowControllerX alloc] initWithWindowKind:@""]; > [myWindowController loadWindow]; > > > windowDidLoad doesn’t get called and the “window” property of > LTWWin

windowDidLoad not getting called

2015-03-19 Thread Dave
Hi, I have a Window Controller (LTWWindowControllerX) that loads a window from a NIB file. I have a class called “LTWWindowX” (it inherits from NSWindow) which is a non-standard window in that it has the appearance of a “Stickies” or “Tool Palette”. The File’s Owner in the NIB is set to LTWWi

- windowDidLoad not getting called !

2009-06-08 Thread Arjun SM
Hi all, I have written an application for which in the about box there is a link to a website. Below is the code for it NSMutableAttributedString *tempCompanyURLString = [[NSMutableAttributedString alloc] initWithString:@"www.mycompany.com"]; // assume string exists NSRange selectedRange = N

Re: -windowDidLoad not getting called

2008-04-21 Thread Chris Hanson
On Apr 21, 2008, at 5:34 PM, Rick Mann wrote: That's all a rather unfortunate inconsistency (and part of why I sit here learning Cocoa and thinking, "I thought Cocoa was supposed to be this great thing"). I basically want my controller to go do some stuff after it and the window are loade

Re: -windowDidLoad not getting called

2008-04-21 Thread Jeff Nouwen
On Apr-21-2008, at 6:34 PM, Rick Mann wrote: I basically want my controller to go do some stuff after it and the window are loaded. -setWindow seems like an ugly place to do this, and -init is probably too early. Is there a better place? - (void)awakeFromNib - Jeff

Re: -windowDidLoad not getting called

2008-04-21 Thread Rick Mann
On Apr 21, 2008, at 5:21 PM, Ken Thomases wrote: Sometimes an NSWindowController is instantiated in a NIB as a controller for a window in that same NIB. Other times, an NSWindowController is outside the NIB that contains its window, and is used to load that NIB. I suspect that -windowDi

Re: -windowDidLoad not getting called

2008-04-21 Thread Ken Thomases
On Apr 21, 2008, at 6:15 PM, Rick Mann wrote: I started a very simple non-document Cocoa app project. I added a controller class derived from NSWindowController, and added an NSObject to my .xib to represent it. I've connected an outlet in my controller to a field in the window, and a button

-windowDidLoad not getting called

2008-04-21 Thread Rick Mann
I started a very simple non-document Cocoa app project. I added a controller class derived from NSWindowController, and added an NSObject to my .xib to represent it. I've connected an outlet in my controller to a field in the window, and a button in the window to an action in the controller

-windowDidLoad not getting called

2008-04-21 Thread Rick Mann
I started a very simple non-document Cocoa app project. I added a controller class derived from NSWindowController, and added an NSObject to my .xib to represent it. I've connected an outlet in my controller to a field in the window, and a button in the window to an action in the controller