> 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.
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
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
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
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
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
> 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.
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…..
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
-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
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
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
the windowDidLoad defined:
-(void) windowDidLoad
{
NSLog(@***windowDidLoad***);
[super windowDidLoad];
}
——
The Window Controller is instantiated with this code:
myWindowController = [[LTWWindowControllerX alloc] initWithWindowKind
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
).
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
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
. 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
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
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
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
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
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,
--
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
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
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
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
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
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
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
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
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
, 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
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
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
34 matches
Mail list logo