Re: windowDidLoad getting called twice?

2016-02-28 Thread Dave
Hi, I found the problem, it was in the Class above the one where I as looking, very confusing as the debugger is a bit glitchy in this area and wouldn’t let me Step Into/Out of properly….. Thanks for the help, All the Best Dave ___ Cocoa-dev mailin

Re: windowDidLoad getting called twice?

2016-02-28 Thread Dave
> On 28 Feb 2016, at 17:55, Keary Suska wrote: > > >> On Feb 28, 2016, at 8:10 AM, Dave wrote: >> >> the winddowDidLoad method of my Window Controller is getting called twice. >> Is this expected behaviour? The window is the NIB has no views setup in the >> window ContentView, I add them af

Re: windowDidLoad getting called twice?

2016-02-28 Thread Keary Suska
> On Feb 28, 2016, at 8:10 AM, Dave wrote: > > the winddowDidLoad method of my Window Controller is getting called twice. Is > this expected behaviour? The window is the NIB has no views setup in the > window ContentView, I add them after the window NIB has loaded. I’m guessing > the second c

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

Re: -windowdidLoad

2015-02-05 Thread Quincey Morris
On Feb 5, 2015, at 13:13 , Raglan T. Tiger wrote: > > What does [super windowDidLoad} accomplish in the subclass implementation of > -windowDidLoad and is it necessary? If “the subclass” is a direct subclass of NSWindowController, then it does what the NSWindowController class reference says i

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