• 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: Focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Focus


  • Subject: Re: Focus
  • From: email@hidden
  • Date: Sat, 8 Mar 2003 17:27:22 +0100

On samedi, mars 8, 2003, at 05:16 PM, Tae-Won Ha wrote:

Hi...

I have a question regarding the focus of NSView subclasses...
I want a NSTextView get the focus when the user selects a row in a NSOutlineView...

My code:
- (void)outlineViewSelectionDidChange:(NSNotification *)notification {
.
.
.
[outlineView unlockFocus];
[textView lockFocus];
.
.
.
}

I got this error msg:
Unlocking Focus on wrong view (<NSOutlineView: 0x16c8790>)

Are those methods the right ones?

I would say that you're making a confusion between the drawing focus and the First responder and that what you're trying to do is:

- (void)outlineViewSelectionDidChange:(NSNotification *)notification {
.
.
.
[[textView window] makeFirstResponder: textView];
.
.
.
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Focus
      • From: Tae-Won Ha <email@hidden>
  • Prev by Date: Focus
  • Next by Date: [beginner] Please help! Insoluble (for me at least) toolbar problem
  • Previous by thread: Focus
  • Next by thread: Re: Focus
  • Index(es):
    • Date
    • Thread