• 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
Challenging text editing field problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Challenging text editing field problem


  • Subject: Challenging text editing field problem
  • From: John Nairn <email@hidden>
  • Date: Mon, 11 Feb 2008 14:21:41 -0800

My interface has a tricky issue when text is edited to a previously empty field (due to way the new text changes the data which then changes the layout of the window). I am having trouble following all the events to make sure handle things in the correct order. The current issue being sure the user does not add more data until the application is ready for it. There are several issues but here is the first:

I have subclassed NSTextField to override some methods including becomeFirstResponder and resignFirstResponder. I was hoping to make use of resignFirstResponder, but when my window opens, the first editing fields gets the following messages:

1. [theField becomeFirstResponder]
2. [theField resignFirstResponder]

and then when the window is open, that field is still the first responder. I can understand getting the becomeFirstResponder message, but why does it get a resignFirstResponder message while it is still the first responder?

When I tab to next field, I get

1. [nextField becomeFirstResponder]
2. [nextField resignFirstResponder]

but I was expecting

1. [theField resignFirstResponder]
2. [nextField becomeFirstResponder]

My only thought is that when a text field becomes the first responder, it immediately gives it up to the field editor?


--------------- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://woodscience.oregonstate.edu/faculty/Nairn FEA/MPM Web Page: http://oregonstate.edu/~nairnj



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Here is code to Convert RGB <-> HSB
  • Next by Date: Re: @property problem
  • Previous by thread: Bugs in NSColor and NSImage in Leopard?
  • Next by thread: Pop-up NSMenu without NSPopUpButton
  • Index(es):
    • Date
    • Thread