duplicating NSTextView
duplicating NSTextView
- Subject: duplicating NSTextView
- From: Fred Klein <email@hidden>
- Date: Fri, 25 Jul 2003 10:12:32 +0200
Hi
I am new to Cocoa. I am trying to duplicate programaticaly an NSTextView in
my Window.
Here's my code, that obviously doesn't work:
- (IBAction)addSet:(id)sender
{
NSTextView *newTextView;
NSRect frameRect;
frameRect = [prototypeView frame];
frameRect = NSOffsetRect(frameRect, 0.0f, 20.0f);
newTextView = [[NSTextView alloc] initWithFrame:frameRect];
[[prototypeView superview] addSubview:newTextView];
[newTextView setNeedsDisplay:YES];
}
Help warmly appreciated in advance
Fred
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.