home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!rosie!aozer
- From: aozer@next.com (Ali Ozer)
- Newsgroups: comp.sys.next.programmer
- Subject: Re: locking focus
- Keywords: lockfocus, flushWindow
- Message-ID: <6140@rosie.NeXT.COM>
- Date: 2 Jan 93 20:25:57 GMT
- References: <1992Dec23.162156.1556@netcom.com> <78766@hydra.gatech.EDU>
- Sender: news@NeXT.COM
- Organization: Next Computer, Inc.
- Lines: 18
-
- In article <78766@hydra.gatech.EDU> Ray Spalding writes:
- >Or, you could do something like the following:
- > BOOL isfv = [self isFocusView];
- > if (!isfv) [self lockFocus];
- > // drawing code goes here
- > if (!isfv) {
- > [self unlockFocus];
- > [[self window] flushWindow];
- > }
-
- It's more efficient to do the flushWindow before you unlockFocus;
- otherwise flushWindow has to temporarily focus on the window containing
- the view. Of course there isn't a noticable hit unless you are doing this
- in a time critical situation.
-
- Ali, Ali_Ozer@NeXT.com
-
-
-