Re: NSTextField action
Re: NSTextField action
- Subject: Re: NSTextField action
- From: Marc Laffitte <email@hidden>
- Date: Mon, 8 Oct 2001 17:28:32 +0200
Hi!
You could implement :
- (void)windowWillClose:(NSNotification *)notification
{
// and call your NSTextField action directly:
[self myNSTextFieldAction:self];
}
in your Preferences window controller.
Marc
>
I'm implementing a Preferences function and have run into a small
>
problem:
>
>
My Preferences window has a single checkbox and a single NSTextField
>
object. Each has an action that calls a method in my class to handle
>
the change of the preference: checkbox goes on or off, textfield gets
>
new value.
>
>
My problem is that my textfield action method only gets called if the
>
user tabs after entering a new value. If they enter a new value and
>
close the Preferences window, my action method does not get called.
>
>
I think I need to establish a method that gets called when the user
>
closes the window, but IB won't let me draw a connection from the
>
window's close button to my handler.
>
>
Your help is appreciated.
>
>
TIA.
>
>
Simon