home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5268 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.6 KB

  1. Path: sparky!uunet!gatech!prism!xray.gatech.edu!cc100aa
  2. From: cc100aa@xray.gatech.edu (Ray Spalding)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: ScollView Strangesness ?
  5. Keywords: what is going wrong ?
  6. Message-ID: <64476@hydra.gatech.EDU>
  7. Date: 27 Jul 92 21:47:15 GMT
  8. References: <151l40INNn1m@agate.berkeley.edu>
  9. Sender: news@prism.gatech.EDU
  10. Organization: Georgia Institute of Technology
  11. Lines: 30
  12.  
  13. In article <151l40INNn1m@agate.berkeley.edu> william@moica.berkeley.edu (William E. Grosso) writes:
  14. >I have a strange prboblem with a ScrollView. It seems to 
  15. >lose branches of the view hierarchy when scrolling 
  16. >(e.g. a subview and all it's descendants will occasionally
  17. >just diappear). Sometimes they reappear if I continue scrolling.
  18. >
  19. >Has this happened to anybody else before ? Any clues as to what
  20. >is going wrong ?
  21.  
  22. Yes, this has happened to me.
  23.  
  24. When you scroll in a piece of a view, drawSelf:: normally is sent
  25. only to the subviews that intersect the newly exposed portion.  If
  26. you have overlapping views, like some shapes (each in a subview)
  27. on a larger background subview, your background will sometimes get
  28. drawSelf:: whereas not necessarily all your shapes will.  The drawing
  29. of the background may then overlay some or all of the shapes.
  30.  
  31. One way to fix this is to set the proper clipping path before
  32. displaying your background view.  Something like:
  33.  
  34. - drawSelf:(const NXRect *)rects :(int)rectCount
  35. {
  36.         if (rectCount == 1) NXRectClip(rects);
  37.         else NXRectClipList(rects+1,2);
  38.  
  39. -- 
  40. Ray Spalding, Office of Information Technology
  41. Georgia Institute of Technology, Atlanta Georgia, 30332-0715
  42. Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
  43.