Bug 3939 - NSAttributedString missing several constants
Summary: NSAttributedString missing several constants
Status: RESOLVED FIXED
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Miguel de Icaza [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2012-03-16 14:48 UTC by steven.orth
Modified: 2014-04-14 06:48 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description steven.orth 2012-03-16 14:48:32 UTC
The NSAttributedString is missing several constants that make using attributed strings more convenient. The current list from Apple is here:

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/Reference/Reference.html

The missing constants are:

NSString *NSSuperscriptAttributeName;
NSString *NSBackgroundColorAttributeName;
NSString *NSAttachmentAttributeName;
NSString *NSLigatureAttributeName;
NSString *NSBaselineOffsetAttributeName;
NSString *NSKernAttributeName;
NSString *NSLinkAttributeName;
NSString *NSStrokeColorAttributeName;
NSString *NSUnderlineColorAttributeName;
NSString *NSStrikethroughStyleAttributeName;
NSString *NSStrikethroughColorAttributeName;
NSString *NSShadowAttributeName;
NSString *NSObliquenessAttributeName;
NSString *NSExpansionAttributeName;
NSString *NSCursorAttributeName;
NSString *NSToolTipAttributeName;
NSString *NSMarkedClauseSegmentAttributeName;
NSString *NSWritingDirectionAttributeName;
NSString *NSVerticalGlyphFormAttributeName;

There is a workaround to get these names, e.g. for 'Shadow":
NSString shadowAttributeName = Dlfcn.GetStringConstant(Dlfcn.dlopen(...args...), "NSShadowAttributeName");
Comment 1 Miguel de Icaza [MSFT] 2012-06-16 13:44:37 UTC
Thanks, Fixed!
Comment 2 alexey 2014-04-14 06:41:06 UTC
Hi, guys! Would you please type where these constants are located. Can't find them in NSAttributedString class.
Comment 3 alexey 2014-04-14 06:48:24 UTC
Just found it in UIStringAttributeKey class.