home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / programm / 7858 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.1 KB  |  33 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!rdg.dec.com!uproar.enet.dec.com!jacksonc
  3. From: jacksonc@uproar.enet.dec.com (Chris Jackson @ IME)
  4. Subject: How to make a window the key window
  5. Message-ID: <1992Dec21.123934.1056@rdg.dec.com>
  6. Lines: 21
  7. Sender: news@rdg.dec.com (Mr News)
  8. Reply-To: jacksonc@uproar.enet.dec.com (Chris Jackson @ IME)
  9. Organization: Digital Equipment Service Industries Solutions Company Ltd
  10. Date: Mon, 21 Dec 1992 12:39:34 GMT
  11.  
  12.  
  13. How do I make a window the key and/or the main window ?
  14.  
  15. I have tried with a very simple application that
  16. has a single window.  When the application is invoked,
  17. its window does not come to the front of the stack and
  18. become the key window.
  19.  
  20. I have tried subclassing Object to produce, say, AppController.
  21. I have made an instance of this the delegate of Application.
  22. When this instance receives the 'appDidInit:' message,
  23. I have tried sending the window a 'makeKeyAndOrderFront:'
  24. message :
  25.  
  26.     [ [NXApp mainWindow] makeKeyAndOrderFront: self ]
  27.  
  28.     but this has no effect.
  29.  
  30. Can anyone help, please ?
  31.  
  32. Chris.
  33.