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