Re: noob q: adding a button to a window programmatically
Re: noob q: adding a button to a window programmatically
- Subject: Re: noob q: adding a button to a window programmatically
- From: Andrew Farmer <email@hidden>
- Date: Mon, 9 Jun 2008 23:08:54 -0700
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 missing some
fundamental concept. Here's my code:
[theWindowContentView setNeedsDisplay:YES];
Not the problem, but as a general note, you should never need to call
setNeedsDisplay: (or its close relative, display) on anything other
than self. Views are supposed to manage redrawing themselves. If they
fail to do so correctly, it's a bug.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden