• 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: NSForegroundColorAttributeName without AppKit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSForegroundColorAttributeName without AppKit


  • Subject: Re: NSForegroundColorAttributeName without AppKit
  • From: Steven Degutis <email@hidden>
  • Date: Mon, 1 Mar 2010 22:39:34 -0500

NSAttributedString is part of Foundation.framework and so are all NSStrings
(including literal constants like @"NSColor"). Thus, you can use that safely
without linking against AppKit.framework; however, I advise against using
string literals in place of Apple's constants, since they might change under
your nose.

-Steven

On Mon, Mar 1, 2010 at 10:27 PM, BareFeet <email@hidden>wrote:

> Thanks Graham for your reply:
>
> >> I have some working code for adding attributes to a string. I'd like to
> modify it so it will work without needing AppKit. I can get it all going
> except the NSForegroundColorAttributeName constant which seems to only exist
> in AppKit.
> >
> > If you log the actual value of that constant, it's simply @"NSColor".
>
> Unfortunately it seems that using the @"NSColor" key as part of an
> NSAttributedString also requires AppKit. Put another way, I can't see any
> way to draw multi-colored text in a wrapping text field without using
> AppKit.
>
> Thanks,
> Tom
> BareFeet
>
> _______________________________________________
>
> 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
>



--
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/
_______________________________________________

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: NSForegroundColorAttributeName without AppKit
      • From: Graham Cox <email@hidden>
References: 
 >Re: NSForegroundColorAttributeName without AppKit (From: BareFeet <email@hidden>)

  • Prev by Date: Re: Forcing the package bit
  • Next by Date: Re: Forcing the package bit
  • Previous by thread: Re: NSForegroundColorAttributeName without AppKit
  • Next by thread: Re: NSForegroundColorAttributeName without AppKit
  • Index(es):
    • Date
    • Thread