I'm trying to flash the selected text synchronously, but asking the NSView to redisplay doesn't draw anything after I change the selection. This code works fine in released versions of Safari 2 (419.3). WebHTMLView *view; [...] NSRect selectionRect = [view selectionRect]; for (i = 0 ; i < textBlinkCount ; i++) { [view deselectAll]; [view setNeedsDisplayInRect: selectionRect]; [view display]; usleep(60000); [[view _bridge] selectNSRange: selectedRange]; [view setNeedsDisplayInRect: selectionRect]; [view display]; usleep(60000); } I asked about this on #webkit and Darin suggested using [[view window] displayIfNeeded], which behaved identically to the above code (works in 419.3, not in nightly).
<rdar://problem/5405513>
I think this may have been a coding error on my part; whatever the issue was, it now works fine with Safari 3.0.4/3.1.