Re: Subview frames and bounds

2008-11-03 Thread Andy Lee
On Nov 3, 2008, at 8:57 AM, Andy Lee wrote: At the risk of confusing things, let me try a metaphor. I live in a city with streets on a grid, and I live on 14th Street and 8th Avenue. Can you tell me right now -- how far is 16th Street and 6th Avenue, and in which direction? Is it north,

Re: Subview frames and bounds

2008-11-03 Thread Andy Lee
On Nov 3, 2008, at 8:23 AM, DKJ wrote: I'm still puzzled by frames and bounds. Short answer: A view's bounds is specified in the view's coordinate system. Its frame is specified in its superview's coordinate system. Longer answer: I wonder if you're unclear on coordinate systems in genera

Re: Subview frames and bounds

2008-11-03 Thread Patrick Mau
On 03.11.2008, at 14:23, DKJ wrote: I'm still puzzled by frames and bounds. I put this in the drawRect: of MyView: [[NSColor redColor] set]; NSRectFill( self.frame ); [[NSColor blueColor] set]; NSFrameRect( self.bounds ); I put this in the awakeFromNib of my c

Subview frames and bounds

2008-11-03 Thread DKJ
I'm still puzzled by frames and bounds. I put this in the drawRect: of MyView: [[NSColor redColor] set]; NSRectFill( self.frame ); [[NSColor blueColor] set]; NSFrameRect( self.bounds ); I put this in the awakeFromNib of my controller: NSRect r = NSMakeR