• 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: Typing attributes and the location of the insertion point
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Typing attributes and the location of the insertion point


  • Subject: Re: Typing attributes and the location of the insertion point
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 3 Mar 2008 09:08:13 -0800


On Mar 3, 2008, at 8:24 AM, Todd Ransom wrote:

This works well when the user is typing at the end of the text. When the user is typing in the middle of existing text, however, the ruler and insertion point do not always update to reflect the paragraph style of the typing attributes. Is this a bug? Or is this by design? I have tried using -[NSTextView updateRuler] to force the ruler to update but this has no effect. Is there any way to force the ruler and insertion point to update properly?

I can't tell exactly what's going on without seeing it, but one thing you need to keep in mind is that paragraph styles need to be constant over the whole range of the paragraph; if they aren't, then paragraph style fixing will make sure they are by extending the paragraph style from the beginning of a paragraph to cover all of it. If the user is typing in the middle of a paragraph, just changing the paragraph style in the typing attributes wouldn't be enough; you would need to change it for the whole paragraph in the text storage.


Douglas Davidson

_______________________________________________

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: Typing attributes and the location of the insertion point
      • From: Todd Ransom <email@hidden>
References: 
 >Typing attributes and the location of the insertion point (From: Todd Ransom <email@hidden>)

  • Prev by Date: Re: Coredata - populating initial data on app load - best practices
  • Next by Date: Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView
  • Previous by thread: Typing attributes and the location of the insertion point
  • Next by thread: Re: Typing attributes and the location of the insertion point
  • Index(es):
    • Date
    • Thread