i want to detect when a custom NSView lost the focus.
I have an NSView which as much as possible mimic the way the address book word.
in fact there is 2 differents NSView in a window: one white and one colored
if i want to display the info for a record i use the white view in the main window using [myPrimaryView addSubView:whiteView]
if i want to modify the info for a record i use the colored view in the main window using [myPrimaryView addSubView:ColorView]
the record is selected from a tableView in the main window.
to add a record i click a button addElement to modify i click a buton modify
to save the new record or the modification to the record i click the modify button as in address book , the button behavior is push on / push off
my problem is that i want to detect if a user quit the modifying state without clicking on the modify button to save the change.
i want to know when the custom colored view lost the focus to:
save automatically the modifications or refuse to resign as first responder to keep the focus and force the user to save changes.
i have tryed to use setRefusesFirstResponde:YES for the other element of the window or to subclass resignFirstResponder in the custom view to detect when the view lost focus but nothing work
As anybody have an idea ???
thanks in advance for any suggestion
S.Baron |