You either have an outlet to the window, or use the -window method on any NSView to get the window that view is in.
There is a -flushWindow method on NSWindow, that should force a flush. You might also try [[NSGraphicsContext currentContext] flushGraphics].