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

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!vin
  3. From: vin@netcom.com (Vin Locke)
  4. Subject: locking focus
  5. Message-ID: <1992Dec23.162156.1556@netcom.com>
  6. Keywords: view, lockfocus, pswrap
  7. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  8. Date: Wed, 23 Dec 1992 16:21:56 GMT
  9. Lines: 31
  10.  
  11. I have a class subclassed from View.
  12. On initialization, a background image is attached, and on mouseDown, 
  13. graphics actions occur in locations pertinent to where the mouse was
  14. clicked. cool. (all these drawn objects are from pswrap-ped PS functions)
  15.  
  16. I have a another method that draws to the view that I want to call from 
  17. a menu, also a pswrap-ped function.  However, when I execute this from the
  18. menu, the graphics are drawn in the menu itself!  yuck-o!  
  19.  
  20. Now, I figure this is a matter of lockFocus.  Thing is, I haven't given
  21. the View a name -- I'm just referring to it as "self" in the methods.  
  22. When the menu executes the method, it does the drawing to the menu window,
  23. and I must find a way to tell it where the drawing should be done -- right?
  24.  
  25. Is there a way I can refer to the window where the drawing _should_ be 
  26. taking place, without having to to assign new id's for this View?  I figure
  27. there must be an easy way to this, but looking through my collection of
  28. examples and sample programs, I can't seem to pinpoint the solution.  I also
  29. suspect my solution may be in IB wiring, rather than in coding.
  30.  
  31.  
  32.  
  33.  
  34. -- 
  35.                     --vin
  36.  
  37. vin@netcom.com
  38.  
  39. "Every reform movement has its lunatic fringe"
  40.                     --Teddy Roosevelt
  41.  
  42.