On 02/03/2010, at 2:39 PM, Steven Degutis wrote:

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


It's a good idea to use the constant where possible, but Apple couldn't just 
change it without breaking binary compatibility, so it should be safe to use 
the literal @"NSColor" in this case, if the constant itself is defined in 
AppKit.

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

Yes, all the attributed string DRAWING functions are in AppKit, but so is 
NSTextField. Foundation provides the existence of NSAttributedString (the data 
model, if you like) but not the view or UI related aspects of it. 

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to