Re: Creating a NSTextField
Re: Creating a NSTextField
- Subject: Re: Creating a NSTextField
- From: Gorazd Krosl <email@hidden>
- Date: Tue, 26 Feb 2008 13:56:32 -0500 (EST)
>> But there is no initialization method for a
>> NSTextField. How can I
>> create a NSTextField? Just alloc?
> NSTextField is a subclass of NSControl. Use
> [[NSTextView >alloc] - initWithFrame:]. Then use
> -addSubview: on your window's -contentView. And
since
> your NSTextView is not instantiated in Interface
>Builder, keep it in an instance variable or
something.
And don't forget to -release it after you add it to
superview, since the latter retains it.
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/
_______________________________________________
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