Re: "Toll free" bridge from NSAttributedString * to CFAttributedStringRef
Re: "Toll free" bridge from NSAttributedString * to CFAttributedStringRef
- Subject: Re: "Toll free" bridge from NSAttributedString * to CFAttributedStringRef
- From: vincent habchi <email@hidden>
- Date: Thu, 8 Apr 2010 18:48:20 +0200
Glenn,
> NSAttributedString and CFAttributedStringRef "the data structure" are toll free bridged, but that just means that the objects themselves can be interchanged. The problem is that, like an NSDictionary, they can store arbitrary objects that may not be toll free bridged - in this case, NSColor and CGColorRef are not interchangeable, nor are the keys NSForegroundColor and kCTForegroundColorAttributeName documented as the same.
>
> So CTLineDraw expects to have the color specified as a CGColorRef in kCTForegroundColorAttributeName, while drawString: expects to have the color specified as an NSColor in NSForegroundColor.
So what's the point in saying that both NSAttributed… and CFAttributed… are toll free bridged, if you cannot use one for another? I find it misleading.
Cheers!
Vincent_______________________________________________
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