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

Re: Controlling Insertion Point


  • Subject: Re: Controlling Insertion Point
  • From: Denis Defreyne <email@hidden>
  • Date: Sat, 13 Mar 2004 15:09:43 +0100

On Mar 13, 2004, at 3:25 AM, Bruce Truax wrote:

> I have a window containing two NSTextViews. The top NSTextView is
> used for
> output. The lower NSTextView is used for input. When the window is
> created
> I would like the text insertion point to be in the lower window so
> that the
> use can start typing commands without first needing to click in the
> lower
> NSTextView. I have looked at the NSTextView documentation but there
> is no
> obvious method to make this the active view.

You can use NSWindow's makeFirstResponder: to do something like that.
In your window controller, do something like [[self window]
makeFirstResponder:myTextView].

You can also do it with Interface Builder. Make a connection from the
window to the text view and connect it to the initiaFirstResponder
outlet.

Denis Defreyne

--
mail: email@hidden
web: http://amonre.bedesign.be/
_______________________________________________
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: Controlling Insertion Point
      • From: Bruce Truax <email@hidden>
References: 
 >Controlling Insertion Point (From: Bruce Truax <email@hidden>)

  • Prev by Date: Clicking Dock Icon creates a new window
  • Next by Date: Re: Packages that launch applications
  • Previous by thread: Controlling Insertion Point
  • Next by thread: Re: Controlling Insertion Point
  • Index(es):
    • Date
    • Thread