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

NSTextView problems


  • Subject: NSTextView problems
  • From: Nick Morris <email@hidden>
  • Date: Sun, 16 Jun 2002 10:40:33 +0100

Hi,

I have spent the best part of a week on this problem and I have come to the conclusion that I am just being thick!

I have read up on NSTextViews, Layout mamagers, etc. etc.

The problem:

The problem is easy....

I have some text in a subclass of NSTextView and all works OK. However, I wish to discover where text is being added. If I use NSLog to examine the NSLayoutManager that is associated with the NSTextView subclass I get (i.e. running a description):

<NSLayoutManager: 0xdf6300>
1 containers, text backing has 7 characters
selected character range {1, 0} affinty: upstream granularity: character
marked character range {7, 0}
Currently holding 7 glyphs with 0 glyph holes and 0 layout holes.
Glyph holes: ()
Layout holes: ()

The "selected character range" (effectively the point of insertion of new character) and "marked character range" contains just the information I need. However, I can not find a method that will return these values!

Any help will be greatly appreciated.

Thanks (in advance)

Nick
_______________________________________________
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: NSTextView problems
      • From: Douglas Davidson <email@hidden>
    • Re: NSTextView problems
      • From: Andy Lee <email@hidden>
  • Prev by Date: [OT] Re: Protecting Software w/ Software License Keys...
  • Next by Date: Re: Protecting Software w/ Software License Keys...
  • Previous by thread: Re: [OT] Re: Protecting Software w/ Software License Keys...
  • Next by thread: Re: NSTextView problems
  • Index(es):
    • Date
    • Thread