Re: Simple NSView Question
Re: Simple NSView Question
- Subject: Re: Simple NSView Question
- From: Andy Lee <email@hidden>
- Date: Wed, 20 Aug 2008 13:41:48 -0400
On Aug 20, 2008, at 1:28 PM, Justin Giboney wrote:
This is assuming, of course, that you have a good reason for adding
the subviews in code rather than in the nib file in the first place
-- perhaps because your view layout is dynamic in some way and
can't be decided until launch time?
Yes I have a good reason. I don't have to have a dynamic layout, but
I plan on having over 100 different views, which would be difficult
to create, and difficult to update or add more.
Makes sense.
I would think that by adding the text view to the hierarchy that it
would remain there every time the view gets redrawn, but apparently
it doesn't. How do I keep it there?
I would think so too. Can you post the entire code of your class?
Also, as a shot in the dark, can you change that NSLog statement to
NSLog(@"0x%X %@", self, [self subviews]);? I wonder if you
accidentally have two instances of your custom view. As another shot
in the dark, could you also add the same NSLog statement to -
addLabelWithText:?
--Andy
_______________________________________________
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