Re: Views, frames, and bounds

2008-10-19 Thread DKJ
I did read the section of the documentation you mentioned, but so far it hasn't helped. I'll show you some of the code I was playing with. I'm just not understanding why I'm getting the results I do. I used IB to create a subview in a window, by dragging a custom layout view from the

Re: Views, frames, and bounds

2008-10-19 Thread Graham Cox
On 20 Oct 2008, at 12:08 am, DKJ wrote: When I run the code I get a nice red rectangle in the window, just where I expected it. But when I replace bounds with frame, I get nothing. That's the first puzzle. Maybe if I can understand what's happening here, the other puzzles will be

Re: Views, frames, and bounds

2008-10-19 Thread Michael Ash
On Sat, Oct 18, 2008 at 11:04 PM, DKJ [EMAIL PROTECTED] wrote: I am unable to understand the relation between the frame and the bounds of an NSView. I've read the documentation in the View Programming Guide, and also played around with them myself in a practice project. In the latter, I tried

Re: Views, frames, and bounds

2008-10-19 Thread Andy Lee
On Oct 19, 2008, at 9:08 AM, DKJ wrote: That's the first puzzle. Maybe if I can understand what's happening here, the other puzzles will be resolved too! Try placing two of your views in the window with different sizes and positions. Add NSLog statements to your -drawRect: method that

Re: Views, frames, and bounds

2008-10-19 Thread DKJ
The penny has finally dropped. Thanks to all for your help. dkj ___ 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

Views, frames, and bounds

2008-10-18 Thread DKJ
I am unable to understand the relation between the frame and the bounds of an NSView. I've read the documentation in the View Programming Guide, and also played around with them myself in a practice project. In the latter, I tried drawing their rectangles in different colours, but couldn't

Re: Views, frames, and bounds

2008-10-18 Thread Jamie Hardt
On Oct 18, 2008, at 8:04 PM, DKJ wrote: I am unable to understand the relation between the frame and the bounds of an NSView. I've read the documentation in the View Programming Guide, and also played around with them myself in a practice project. In the latter, I tried drawing their