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/
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 mails | Author | Date |
|---|---|---|
| Felipe Monteiro de… | Feb 26, 17:13 | |
| Ken Worley | Feb 26, 18:21 | |
| Jerry Krinock | Feb 26, 18:24 | |
| Gorazd Krosl | Feb 26, 19:56 |






Cocoa mail archive

