• 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
NSTextField subclass needs cell subclass as well - how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextField subclass needs cell subclass as well - how?


  • Subject: NSTextField subclass needs cell subclass as well - how?
  • From: Graham Cox <email@hidden>
  • Date: Thu, 08 Oct 2015 11:50:54 +1100

I have a NSTextField subclass that must currently also always have a NSTextFieldCell subclass internally (which in turn is needed only to provide a custom Field Editor when needed).

In 10.10, cells are deprecated, though the cell is still there. I previously returned the custom class from +cellClass, but this is now deprecated and no longer called. The documentation states that +setCellClass: can be called from -awakeFromNib to set a custom cell class, but that method is also deprecated and it doesn’t do what the documentation says anyway (if it ever did - first time I’ve tried this).

What can I do to make sure that the text fields get the necessary custom cell?

I *can* set the cell class in IB, and that’s fine as such, but I’d rather do it in code, because I have hundreds of these fields and it would be a lot simpler to simply set the cell class once in code instead of hundreds of times in IB.

I understand that cells are going away, but there currently doesn’t seem to be a replacement for returning a custom field editor for a given text field that doesn’t involve its cell. If there is, and I’ve missed it, that would be a better solution, so maybe someone could point me at what I should be doing.

—Graham



_______________________________________________

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


  • Follow-Ups:
    • Re: NSTextField subclass needs cell subclass as well - how?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: CFBundleSupportedPlatforms issue
  • Next by Date: Re: NSTextField subclass needs cell subclass as well - how?
  • Previous by thread: Re: How to get a condensed San Francisco UIFont?
  • Next by thread: Re: NSTextField subclass needs cell subclass as well - how?
  • Index(es):
    • Date
    • Thread