Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!ucbvax!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Novice AppKit/IB question about Wait Cursors Summary: How do I know when a window has finished flushing? Message-ID: <198@toaster.SFSU.EDU> Date: 21 Dec 89 02:56:02 GMT Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Organization: San Francisco State University Lines: 48 I want to make a window with a "next" button; you click the button, and the window is replaced on the screen by a previously unseen window. The transition is one-way. window1 window2 +--------+ +---------------+ | | | other ^ | | BUTTON | | stuff | | (instantiated in IB) +----|---+ +-------------|-+ | | | (custom object) | | outlet transitTo-/ \->action transit: So I say - transit:sender { [[sender window] close]; [transitTo makeKeyAndOrderFront:sender]; return self; } The thing is, window2 is pretty complicated, and it takes a noticeable amount of time to appear. Looks like a good place for a wait cursor. So I bracket the transition, and a wait cursor flashes for an instant, then reverts to an arrow well before the second window appears. Then I try putting in an NXPing(); but this doesn't seem to change anything. The method now looks like: - transit:sender { [NXWait push]; [[sender window] close]; [transitTo makeKeyAndOrderFront:sender]; NXPing(); [NXWait pop]; return self; } I tried putting [transitTo flushWindow] before the NXPing(); and that didn't do it either. How do I keep the wait cursor up until the second window is flushed? Do I have to hack this into a windowDidBecomeKey delegate method? (Will that even work?) I'm sure I'm missing something obvious. -=EPS=-