• 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
Re: Automatic key view handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic key view handling


  • Subject: Re: Automatic key view handling
  • From: Ricky Sharp <email@hidden>
  • Date: Mon, 21 Feb 2005 08:58:17 -0600

On Monday, February 21, 2005, at 08:09AM, Ricky Sharp <email@hidden> wrote:

>What I could do is that whenever my tab view changes, I can somehow sense that no view currently has first responder status (my guess is that firstResponder will return nil.  I can then call [myTablessTabView nextValidKeyView] to find the view (if any) that should now have first responder status.


A solution (workaround) in case anyone needs it.

For example, a radio button set wired to control which tab of a tabless tab view is displayed:

- (IBAction)setFirstTab:(id)sender
{
	[tabView selectTabViewItemAtIndex:0];

	NSWindow*	theWindow = [tabView window];

	if ([theWindow firstResponder] == theWindow)
		{
		NSResponder*	theNewResponder = [tabView previousValidKeyView];  // [ 1 ]

		if (theNewResponder != nil)
			{
			[theWindow makeFirstResponder:theNewResponder];
			}
		}
}

[ 1 ] The new responder can also be the result of nextValidKeyView; all depends on what you need.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
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

  • Follow-Ups:
    • Re: Automatic key view handling
      • From: Ricky Sharp <email@hidden>
References: 
 >Automatic key view handling (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: convert int to NSString (Newbie)
  • Next by Date: Re: login item for all users
  • Previous by thread: Automatic key view handling
  • Next by thread: Re: Automatic key view handling
  • Index(es):
    • Date
    • Thread