• 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: Glyph range in textContainers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Glyph range in textContainers


  • Subject: Re: Glyph range in textContainers
  • From: Dave Mattson <email@hidden>
  • Date: Wed, 13 Nov 2002 14:59:05 -0600

Hello:
I found different behavior for the two calls. All seems to be
undocumented. Experimentation was necessary to sort things out.

It seems that "[lm glyphRangeForTextContainer:tc];" will give back a
glyph range that indicates the range that will fit.

The other call has the habit of sending back {0,0} unless everything
fits. Or maybe it has the habit of dropping off a paragraph that
doesn't fit.

In our application paragraphs weren't applicable and we were having
entire containers of text disappear.


On Wednesday, November 13, 2002, at 02:30 PM, Douglas Davidson wrote:

>
> On Wednesday, November 13, 2002, at 05:34 AM, Reza Farhad wrote:
>
>> I have a textstorage that is associated with a number of text
>> containers, and I am trying to find out the range of text in each
>> container.
>>
>> I have been using the call
>> "-textContainerForGlyphAtIndex:effectiveRange:" as the documentation
>> indicates that it is the preferred option to
>> "-glyphRangeForTextContainer: " as it is more efficient.
>>
>> oddly, using "-textContainerForGlyphAtIndex:effectiveRange:" I have
>> got the range of up to whole paragraphs only and it has ignored any
>> incomplete paragraphs at the end of the textcontainer. This is not
>> the case if I use "glyphRangeForTextContainer".
>>
>> Can anybody shed some light on to this, and also why one call is
>> recommended over the other, as in the documentation it does imply
>> that both calls "Performs glyph generation and layout if needed".
>
> Can you make a small example app that demonstrates this? That sounds
> odd to me; I suspect there might be some other difference that would
> account for this.
>
> 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.
_______________________________________________
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.

  • Prev by Date: Low-level equivalent of NSLock?
  • Next by Date: Re: Main Menu Duplication Feature
  • Previous by thread: Re: Glyph range in textContainers
  • Next by thread: Re: Connection warning icons?
  • Index(es):
    • Date
    • Thread