Re: how do I put a subview in a superview with color

2010-12-31 Thread colo
Hi all. I think I got this down to a science once it works. Recap: I want to learn the ability to directly put Cocoa desktop NSView subClass View into another subClass view repeat until not needed. No reason application design wise. I just need to know how to do it. I changed the implementation o

Re: how do I put a subview in a superview with color

2010-12-30 Thread John Joyce
On Dec 30, 2010, at 7:44 PM, colo wrote: > On Thu, Dec 30, 2010 at 6:50 PM, aglee wrote: >> On Dec 30, 2010, at 06:13 PM, colo wrote: >> >> I can get it to compile just fine now but I can't get the button to >> show up at all. >> Perhaps I am sending the addSubview to the incorrect place? NSVi

Re: how do I put a subview in a superview with color

2010-12-30 Thread colo
On Thu, Dec 30, 2010 at 6:50 PM, aglee wrote: > On Dec 30, 2010, at 06:13 PM, colo wrote: > > I can get it to compile just fine now but I can't get the button to > show up at all. > Perhaps I am sending the addSubview to the incorrect place? NSView > *superview = [window contentView]; > I thought

Re: how do I put a subview in a superview with color

2010-12-30 Thread aglee
On Dec 30, 2010, at 06:13 PM, colo wrote: I can get it to compile just fine now but I can't get the button to show up at all. Perhaps I am sending the addSubview to the incorrect place? NSView *superview = [window contentView]; I thought contentView was the top. @implementation WVShapesView -(

Re: how do I put a subview in a superview with color

2010-12-30 Thread colo
On Thu, Dec 30, 2010 at 5:32 PM, Alastair Houghton wrote: > On 30 Dec 2010, at 22:22, colo wrote: > >> I was following the Chapter 17 Cocoa programming for osx 3rd ed >> The code is below. >> All I want to do for a working example is draw an NSView subview in >> the superview. >> And give it have

Re: how do I put a subview in a superview with color

2010-12-30 Thread Alastair Houghton
On 30 Dec 2010, at 22:22, colo wrote: > I was following the Chapter 17 Cocoa programming for osx 3rd ed > The code is below. > All I want to do for a working example is draw an NSView subview in > the superview. > And give it have a color and width height. > > I was trying all sorts of things. I

how do I put a subview in a superview with color

2010-12-30 Thread colo
I was following the Chapter 17 Cocoa programming for osx 3rd ed The code is below. All I want to do for a working example is draw an NSView subview in the superview. And give it have a color and width height. I was trying all sorts of things. I can draw NSMakeRects in the drawRect method But I jus