Re: Opposite of windowDidLoad

2017-01-12 Thread Charles Srstka
> On Jan 12, 2017, at 12:53 PM, Quincey Morris > wrote: > > windowWillClose is an acceptable place to tear down the binding only if (a) > the thing bound, and the thing bound to, still exist, and (b) there is no > chance that the window will be re-opened.

Re: Opposite of windowDidLoad

2017-01-12 Thread Quincey Morris
nt on the thing being bound and the thing being bound to. You must establish the binding after both things have been created, and tear down the binding before either thing is destroyed. Note that windowDidLoad is a place where things like this are often done, because it happens at a time

Re: Opposite of windowDidLoad

2017-01-12 Thread Sandor Szatmari
If the window has the same lifespan as the controller, why not dealloc? Otherwise, wherever your closing your window. Sandor > On Jan 12, 2017, at 06:46, Daryle Walker wrote: > > I was thinking of adding a Cocoa Binding during my window-controller's > did-load method. But

Opposite of windowDidLoad

2017-01-12 Thread Daryle Walker
I was thinking of adding a Cocoa Binding during my window-controller's did-load method. But where would the unbinding go? I see waiting until deinit or implementing NSWindowDelegate and using windowWillClose. Is there a similar access point for view-controllers? Sent from my iPhone

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

Re: windowDidLoad getting called twice?

2016-02-28 Thread Dave
t; I have, it’s getting called twice, and I think I now know why, this is the windowDidLoadMethod -(void) windowDidLoad { LTWWindowBase* myWindow; //[super windowDidLoad]; myWindow = (LTWWindowBase*) self.window; [myWindow initializeWindowWithWindowCon

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.

windowDidLoad getting called twice?

2016-02-28 Thread Dave
Hi, 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 call is when I add subviews to the Content View…..

Re: windowDidLoad not getting called

2015-03-20 Thread Bill Cheeseman
of the -applicationDidFinishLaunching: delegate method. My implementation of the delgate method then explicitly creates my window controller object and initializes it using -initWithWindowNibName:MainWindow. This is what loads my MainWindow nib file and calls its -windowDidLoad method. When the nib file loads, somebody notices

Re: windowDidLoad not getting called

2015-03-20 Thread Bill Cheeseman
-initWithWindowNibName:MainWindow. This is what loads my MainWindow nib file and calls its -windowDidLoad method. Nope. That's not enough. A window controller does not load the NIB (nor call -windowDidLoad) just because it's been allocated and initialized with a NIB name. Something has

Re: windowDidLoad not getting called

2015-03-20 Thread Ken Thomases
implementation of the -applicationDidFinishLaunching: delegate method. My implementation of the delgate method then explicitly creates my window controller object and initializes it using -initWithWindowNibName:MainWindow. This is what loads my MainWindow nib file and calls its -windowDidLoad

Re: windowDidLoad not getting called

2015-03-19 Thread dangerwillrobinsondanger
On 2015/03/20, at 6:59, Sean McBride s...@rogue-research.com 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

windowDidLoad not getting called

2015-03-19 Thread Dave
the windowDidLoad defined: -(void) windowDidLoad { NSLog(@***windowDidLoad***); [super windowDidLoad]; } —— The Window Controller is instantiated with this code: myWindowController = [[LTWWindowControllerX alloc] initWithWindowKind

Re: windowDidLoad not getting called

2015-03-19 Thread Bill Cheeseman
On Mar 19, 2015, at 2:34 PM, Ken Thomases k...@codeweavers.com 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

Re: windowDidLoad not getting called

2015-03-19 Thread Ken Thomases
). Or set Visible at Launch in the window controller's nib file, at least if you don't have to attach a sheet to it or do other things with it before it is shown. It really means visible when the nib file loads. That doesn't help with getting the window controller's -windowDidLoad method called

Re: windowDidLoad not getting called

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

Re: windowDidLoad not getting called

2015-03-19 Thread Ken Thomases
. See the docs for that method. 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). windowDidLoad doesn’t get called and the “window” property of LTWWindowControllerX doesn’t get set. I’m

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 wjcheese...@gmail.com wrote: On Mar 19, 2015, at 2:34 PM, Ken Thomases k...@codeweavers.com wrote: To force the window controller to load the window, request

Re: windowDidLoad not getting called

2015-03-19 Thread Quincey Morris
On Mar 19, 2015, at 13:39 , Bill Cheeseman wjcheese...@gmail.com wrote: On Mar 19, 2015, at 3:54 PM, Ken Thomases k...@codeweavers.com mailto:k...@codeweavers.com wrote: That doesn't help with getting the window controller's -windowDidLoad method called. In fact, that setting almost

Re: windowDidLoad not getting called

2015-03-19 Thread Bill Cheeseman
On Mar 19, 2015, at 3:54 PM, Ken Thomases k...@codeweavers.com 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

Re: windowDidLoad not getting called

2015-03-19 Thread Ken Thomases
On Mar 19, 2015, at 3:39 PM, Bill Cheeseman wjcheese...@gmail.com 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

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, --

-windowdidLoad

2015-02-05 Thread Raglan T. Tiger
What does [super windowDidLoad} accomplish in the subclass implementation of -windowDidLoad and is it necessary? -rags ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: -windowdidLoad

2015-02-05 Thread Quincey Morris
On Feb 5, 2015, at 13:13 , Raglan T. Tiger r...@crusaderrabbit.net 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

Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote: Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever that NSDocument method is) for setting up inter-view relationships. Hmm ... so

Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]

2009-08-20 Thread Kyle Sluder
On Aug 20, 2009, at 8:05 AM, I. Savant idiotsavant2...@gmail.com wrote: Hmm ... so would you say to do otherwise is doing it wrong or doing it sub-optimally? No, but if it winds up mattering, that's how it usually shakes out. So I tend to follow that pattern even before it begins to

Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]

2009-08-20 Thread Andy Lee
On Aug 20, 2009, at 11:05 AM, I. Savant wrote: On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote: Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever that NSDocument method

- windowDidLoad not getting called !

2009-06-08 Thread Arjun SM
the link its font would change?? Even though i tried to use a windowDidLoad delegate method its not getting called. i am unable to get the desired result of the link not changing the font. please help. thanks, Arjun ___ Cocoa-dev mailing list (Cocoa-dev

Re: -windowDidLoad not getting called

2008-04-22 Thread Chris Hanson
that, then the window controller will load the nib itself, and thus load the window within it too and send itself -windowDidLoad at the end. Since your window controller isn't what loaded the nib containing the window, its - windowDidLoad won't be invoked. You could refactor your nib so

-windowDidLoad not getting called

2008-04-21 Thread Rick Mann
in the controller. I've also set the NSWindowController's window outlet to the window. When the app launches, I see the window, and I can click the button and my action is called (and it updates the field). But, - windowDidLoad is never called. What did I forget? TIA, -- Rick

-windowDidLoad not getting called

2008-04-21 Thread Rick Mann
in the controller. I've also set the NSWindowController's window outlet to the window. When the app launches, I see the window, and I can click the button and my action is called (and it updates the field). But, - windowDidLoad is never called. What did I forget? TIA -- Rick

Re: -windowDidLoad not getting called

2008-04-21 Thread Ken Thomases
, and a button in the window to an action in the controller. I've also set the NSWindowController's window outlet to the window. When the app launches, I see the window, and I can click the button and my action is called (and it updates the field). But, - windowDidLoad is never called. What did I

Re: -windowDidLoad not getting called

2008-04-21 Thread Rick Mann
that -windowDidLoad is only called in the latter case. Read the description of the -window and -loadWindow methods, which describes how -windowDidLoad is called. In the former case, the NSWindowController isn't initialized with a NIB. It's just initialized with -init, which is presumably a cover

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