Re: Simple NSView Question
Re: Simple NSView Question
- Subject: Re: Simple NSView Question
- From: Justin Giboney <email@hidden>
- Date: Wed, 20 Aug 2008 11:53:00 -0600
Thanks for the help. For some reason I pulled a custom view onto the
screen and also pulled an object over to the file (instantiating an
object). I connected the outlet to that instead of the view in the
window. I don't know what I was thinking. Works well now.
Thanks
Justin Giboney
On Aug 20, 2008, at 11:41 AM, Andy Lee wrote:
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