Skip navigation.
 
mlRe: Creating a NSTextField
FROM : Gorazd Krosl
DATE : Tue Feb 26 19:56:32 2008

>> 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/

Related mailsAuthorDate
mlCreating a NSTextField Felipe Monteiro de… Feb 26, 17:13
mlRe: Creating a NSTextField Ken Worley Feb 26, 18:21
mlRe: Creating a NSTextField Jerry Krinock Feb 26, 18:24
mlRe: Creating a NSTextField Gorazd Krosl Feb 26, 19:56