home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5729 < prev    next >
Encoding:
Text File  |  1992-08-20  |  944 b   |  39 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!ede978e
  3. From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
  4. Subject: Window's order
  5. Message-ID: <1992Aug21.082146.10555@monu6.cc.monash.edu.au>
  6. Summary: [window orderfront]
  7. Organization: Monash University, Caulfield Campus
  8. Date: Fri, 21 Aug 1992 08:21:46 GMT
  9. Lines: 28
  10.  
  11. I wish to only make a window order front if it 
  12. is not already at the front.  I tried this.
  13.  
  14. - makeKeyAndOrderFront:sender
  15. {
  16.         /* only bring to front if not already at front */
  17.         
  18.     unsigned int windowNumber;
  19.     int frontWindowNum;
  20.     int localWindowNum;
  21.             
  22.     localWindowNum = [window windowNum];
  23.     if (localWindowNum > 0) {
  24.         NXConvertWinNumToGlobal(localWindowNum, &windowNumber);
  25.          PSfrontwindow(&frontWindowNum);
  26.        
  27.          if (frontWindowNum != windowNumber) {
  28.              [window orderFront:sender];
  29.           }
  30.     } else {            
  31.         [window orderFront:sender];
  32.     }
  33.             
  34.     return self;
  35. }
  36.  
  37.  
  38.  
  39.