• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSView and focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView and focus


  • Subject: NSView and focus
  • From: Stéphane BARON <email@hidden>
  • Date: Sat, 16 Apr 2005 19:34:58 +0200

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: PostgreSQL and Objective-C
  • Next by Date: Re: Short Date Format for NSCalendarDate in bound NSTableColumn
  • Previous by thread: Re: lockFocus clearing current color
  • Next by thread: what is the most common FFT
  • Index(es):
    • Date
    • Thread