• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Creating a NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Animated button
  • Next by Date: wiring up core data, bindings, NSArrayController and NSCollectionView
  • Previous by thread: Re: Creating a NSTextField
  • Next by thread: Re: Responding To Screen Saver/Sleep Events
  • Index(es):
    • Date
    • Thread