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

Re: NSTextStorage subclass question


  • Subject: Re: NSTextStorage subclass question
  • From: Gideon King <email@hidden>
  • Date: Sun, 7 Feb 2010 18:00:57 +1000

Thanks for mentioning that - I did actually pick that one up along the way and changed it, but it appears that I still needed to delay the selection change on the text view as well.

On 07/02/2010, at 12:42 PM, Kyle Sluder wrote:

> On Sat, Feb 6, 2010 at 6:17 PM, Gideon King <email@hidden> wrote:
>> I found the root cause of my problem - I was trying to call setSelectedRange and setTypingAttributes on my text view in the textStorage processEditing method, and the system didn't like that. I have altered it to use perform...afterDelay: and it works fine now.
>
> This is not the correct way to fix this problem.
>
> You should not have overridden -processEditing. You should instead
> have implemented -textStorageWillProcessEditing: in your text
> storage's delegate, which the documentation describes as the
> appropriate place to "make changes to the text storage object’s
> characters or attributes to enforce whatever constraints it
> establishes."
>
> --Kyle Sluder

_______________________________________________

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

References: 
 >NSTextStorage subclass question (From: Gideon King <email@hidden>)
 >Re: NSTextStorage subclass question (From: Gideon King <email@hidden>)
 >Re: NSTextStorage subclass question (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Simple NSWindowController (or window in secondary nib)
  • Next by Date: Re: coredata: custom accessors
  • Previous by thread: Re: NSTextStorage subclass question
  • Next by thread: coredata: custom accessors
  • Index(es):
    • Date
    • Thread