Re: noob q: adding a button to a window programmatically

2008-06-09 Thread Andrew Farmer
On 09 Jun 08, at 22:28, Stuart Malin wrote: Until now I have created my GUIs using IB. I want a better understanding of what goes on "under the hood" of instantiating a Nib, so decided to try adding a button to a window programmatically. I can't get the button to appear, and so presume I am

Re: noob q: adding a button to a window programmatically

2008-06-09 Thread Graham Cox
You haven't set the button's frame size. If you use -initWithFrame: and pass something sensible that should work. Note - because NSButton subclasses NSView, the designated initializer for NSView (initWithFrame;) must be used. hth, Graham On 10 Jun 2008, at 3:28 pm, Stuart Malin wrote: U

Re: noob q: adding a button to a window programmatically

2008-06-09 Thread Bob Warwick
On 10-Jun-08, at 2:28 AM, Stuart Malin wrote: Until now I have created my GUIs using IB. I want a better understanding of what goes on "under the hood" of instantiating a Nib, so decided to try adding a button to a window programmatically. I can't get the button to appear, and so presume

noob q: adding a button to a window programmatically

2008-06-09 Thread Stuart Malin
Until now I have created my GUIs using IB. I want a better understanding of what goes on "under the hood" of instantiating a Nib, so decided to try adding a button to a window programmatically. I can't get the button to appear, and so presume I am missing some fundamental concept. Here's