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

Re: NSLayoutManager question


  • Subject: Re: NSLayoutManager question
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 20 Feb 2002 13:22:07 -0800

On Wednesday, February 20, 2002, at 12:24 PM, Paul Bayley wrote:

Nobody on this list has tried this.

Or if they have, they haven't informed you of it.

I'm not clear what the selection process is then. I know NSTextView knows where the mouseDown occurs, but I thought it passed that information to NSLayoutManager so it could make the selection. For example if one document spans two views (like page 1+2) how would NSTextView know what to select? I thought that each view would report each end of the selection to NSLayoutManager which would perform the selection (not only visually but also creating a text range).

Certain things are shared between multiple text views attached to a given layout manager. Among them is the selectedRange. The text view that receives the mouseDown: handles the resulting modal loop, and determines the selection, based on information gathered from the shared layout manager as I described. All that must be done here is to set the selectedRange as desired; the text machinery will take care of displaying it.

Douglas Davidson
_______________________________________________
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: NSLayoutManager question
      • From: Paul Bayley <email@hidden>
References: 
 >Re: NSLayoutManager question (From: Paul Bayley <email@hidden>)

  • Prev by Date: Re: NSThread question
  • Next by Date: Re: Authorization API calI in Cocoa-Java
  • Previous by thread: Re: NSLayoutManager question
  • Next by thread: Re: NSLayoutManager question
  • Index(es):
    • Date
    • Thread