I think that I am really close to this... but I can't find the next
step.
I am trying to build a view programatically after the application has
launched. So I have a custom view that has one method:
- (void)addLabelWithText:(NSString *)text
{
NSTextField *newTextField = [[NSTextField alloc]
initWithFrame:NSMakeRect(5,5,17,50)];
[newTextField setStringValue:text];
[self addSubview: newTextField];
//[self setNeedsDisplay:YES];
}
If I add the code above into the drawRect: method, it works just fine.
I think I need the commented line, but whether it is commented or not,
it doesn't work. What do I have to do to redraw the view with the text
field?
Thank you,
Justin Giboney
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]