Where to enqueue coalescing notifications for typing?
Where to enqueue coalescing notifications for typing?
- Subject: Where to enqueue coalescing notifications for typing?
- From: Keith Blount <email@hidden>
- Date: Fri, 8 Apr 2005 11:59:38 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hello,
I need to update part of my display whenever the user
finishes typing in an NSTextView. According to the
docs,the best way to do this is using
NSNotificationQueue. I tried the following in an
NSTextView subclass:
- (void)didChangeText
{
[super didChangeText];
[[NSNotificationQueue defaultQueue]
enqueueNotification:[NSNotification
notificationWithName:_KBTextViewDidFinishTypingNotification
object:self] postingStyle:NSPostWhenIdle
coalesceMask:NSNotificationCoalescingOnName
forModes:nil];
}
I registered self as an observer of
_KBTextViewDidFinishTypingNotification. However, the
notification is still being sent on every letter typed
(typing fast), not when typing ends or pauses. Does
anybody know what I am doing wrong, or the best way of
coalescing notifications so that they are only sent
upon the user finishing typing?
Many thanks in advance,
Keith
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
_______________________________________________
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