home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5628 < prev    next >
Encoding:
Text File  |  1992-08-14  |  2.2 KB  |  69 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!caen!nic.umass.edu!titan.ucc.umass.edu!a74k110
  3. From: a74k110@titan.ucc.umass.edu (Chris Lloyd)
  4. Subject: Re: Tracking the currentdocument
  5. Message-ID: <1992Aug15.044803.13242@nic.umass.edu>
  6. Sender: usenet@nic.umass.edu (USENET News System)
  7. Nntp-Posting-Host: titan.ucc.umass.edu
  8. Organization: University of Massachusetts, Amherst
  9. References: <1992Aug15.023340.28812@monu6.cc.monash.edu.au>
  10. Date: Sat, 15 Aug 1992 04:48:03 GMT
  11. Lines: 56
  12.  
  13. In article <1992Aug15.023340.28812@monu6.cc.monash.edu.au> ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
  14. >- drawSelf:(NXRect *)rects :(int)count
  15. >{
  16. >
  17. >    Room *highlightedRoom;
  18. >        
  19.  
  20. Get rid of this erase, it's pointless since you do a composite with COPY
  21. right after it which just blasts over the fill.
  22.  
  23. >  /* erase update rect since the nximage might be smaller than our bounds */
  24. >
  25. >    PSsetgray(NX_WHITE);
  26. >    NXRectFill(&rects[0]);
  27.  
  28.  
  29. >    [image composite:NX_COPY
  30. >              fromRect:&rects[0]
  31. >              toPoint:&rects[0].origin];
  32. >                
  33.  
  34. This doesn't make sense, you want to draw for THIS window (the one the view
  35. is in), not the current document window. If you have one document, the current
  36. document will be this window, if you dont, you want to draw for the window this
  37. document/view is IN, not the current one.
  38.  
  39. >    highlightedRoom = [[NXApp currentDocument] currentHighlightedRoom];
  40.  
  41.      highlightedRoom = [[window delegate] currentHighlightedRoom];
  42.  
  43. No need to bother with the check's currentDocument do.
  44.  
  45. >    if (highlightedRoom) {
  46. >        NXRect intersectRect;
  47. >        NXRect *intersects;
  48. >                                
  49. >        [highlightedRoom scaledRoomRect:&intersectRect];
  50. >        intersects = NXIntersectionRect(&rects[0],&intersectRect);
  51. >        if (intersects) {
  52. >            NXHighlightRect(&intersectRect);
  53. >        }
  54. >    }
  55. >       
  56. >    return self;
  57. >}
  58. >
  59. [...]
  60. >What are the common uses of windowDidResignKey and windowDidResignMain when
  61. >applied to apps that have global inspectors.
  62.  
  63. Disabling/enabling items and updating fields in the inspector to reflect
  64. the current document/window or lack thereof.
  65.  
  66. la la la,
  67. -- 
  68. :: Christopher Lloyd :: a74k110@titan.ucc.umass.edu :: Yrrid, Inc. ::
  69.