• 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
Multiples calls to acceptsFirstResponder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiples calls to acceptsFirstResponder


  • Subject: Multiples calls to acceptsFirstResponder
  • From: Andre Masse <email@hidden>
  • Date: Fri, 03 Oct 2008 15:02:00 -0400

Hi All,

I'm re-learning Cocoa (been on Windows/Java for the last 5-6 years) using "Cocoa Programming For Mac OS X" third edition. I'm at chapter 19 (keyboard events) and I've noticed that my custom view (BigLetterView for those who know the book) overridden - (BOOL)acceptsFirstResponder is sometime called multiple times:

- 2 times at launch (before becoming firstResponder),
- 2 times after pressing tab for the first time (before resigning),
- 4 times when tabbing in

The author has a remark about it saying:

"Yes, acceptsFirstResponder gets called more times than you might expect each time the view is selected"

but doesn't say why...

Just for my own curiosity, why??

Thanks,

Andre Masse

PS: Glad to see some familiar names from MacZoop times. Hi to Graham Cox and Uli Kusterer! I see you're both as helpfull now than you were then :-)
_______________________________________________


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


  • Follow-Ups:
    • Re: Multiples calls to acceptsFirstResponder
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: NSCoding protocol
  • Next by Date: Help for a beginner..
  • Previous by thread: Re: NSCoding protocol
  • Next by thread: Re: Multiples calls to acceptsFirstResponder
  • Index(es):
    • Date
    • Thread