• 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
Where to enforce paragraph-cohesion policy in text system?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where to enforce paragraph-cohesion policy in text system?


  • Subject: Where to enforce paragraph-cohesion policy in text system?
  • From: Daniel Jalkut <email@hidden>
  • Date: Sun, 17 Feb 2008 20:03:35 -0500


My goal is to impose a policy in my series of text containers, such that a paragraph is never split across two containers. Because I have very small paragarphs (clues of a crossword puzzle), it makes sense to leave a blank space at the bottom of one container (a column) than it does to break the paragraph across two columns.


I'm trying to figure out the most appropriate place to impose this kind of policy. I'm intrigued by NSTypesetter because it seems to be where the action of determining line fragment rectangles happens. Should I be subclassing NSTypesetter and somehow causing it to avoid seeking to fill a container with line fragments, if it won't succeed in filling an entire paragraph?

I'm a little intrigued by NSLayoutManager's textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout, but I suspect I won't really know until it's too late that a paragraph didn't fit in the container. By then it seems complicated to undo the previously laid out line fragments.

Is it possible I'm overlooking an easy solution to this problem? If not, what would be a good strategy to implement my own general solution?

Daniel
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Where to enforce paragraph-cohesion policy in text system?
      • From: Douglas Davidson <email@hidden>
    • Re: Where to enforce paragraph-cohesion policy in text system?
      • From: Ben Lachman <email@hidden>
  • Prev by Date: Re: Best way to replace one view with another within a superview
  • Next by Date: re: CoreData Performance Mystery
  • Previous by thread: Re: Best way to replace one view with another within a superview
  • Next by thread: Re: Where to enforce paragraph-cohesion policy in text system?
  • Index(es):
    • Date
    • Thread