> When I turn off the progress indicator 
> however, or when I update the string value of the text field, the drawing 
> from the drawRect method above is drawn offset from its origin, instead 
> drawing at the origin of either of the subviews, resulting in spurious 
> lines being drawn where there should only be background (the gradient). 
> (You can see a screenshot of the effect here: 
> http://sintraworks.com/private/RenderingMess.png)

The rect passed to -[NSView drawRect:] is the dirty rect of the view,
not the bounds of the view. The changing subviews are dirtying your view
and then you're drawing as if that changed area was your complete frame.

Try replacing your use of rect with -[NSView bounds] instead, and then
take a look at the View Programming Guide [1].

-Ben

[1]: 
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/Introduction/chapter_1_section_1.html>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to