• 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 subclassing issue in 10.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextStorage subclassing issue in 10.4


  • Subject: Re: NSTextStorage subclassing issue in 10.4
  • From: Erik Buck <email@hidden>
  • Date: Wed, 25 May 2005 13:48:48 -0700 (PDT)

How about this ?
 
In -endEditing, cancel an pending previous perform requests and then schedule a preform request for the future.
 
The scheduled perform request will be executed once after the current event is processed.  e.g. (typed in mail)
 
- endEditing
{
  [[self class] cancelPreviousPerformRequestsWithTargetself selector:(:@selector(fixNoteAttributes:) object:nil];
  [self performSelector:@selector(fixNoteAttributes:) withObject:nil afterDelay:0.0];
  [super endEditing];
}
 
- fixNoteAttributes:(id)dummy
{
  // I will only be called once per run loop pass no matter how many time -endEditing is
  // called in one run loop pass
}
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Managed Objects and Unorthodox Objects
  • Next by Date: Temporarily disabling Undo Registration with Core Data
  • Previous by thread: Re: NSTextStorage subclassing issue in 10.4
  • Next by thread: NSRulerView
  • Index(es):
    • Date
    • Thread