On Oct 9, 2010, at 2:05 PM, [email protected] wrote: > I want to make a NSDictionary of text attributes to apply to text being > drawn in a NSTextFieldCell. > > This > > m_textAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSFont > systemFontOfSize:12.0], NSFontAttributeName, NSRightTextAlignment, > NSTextAlignment, nil]; > > gives this error: > > error: syntax error before 'NSTextAlignment'
NSRightTextAlignment is not an object and so can't be stored in a dictionary. You could wrap it in an NSNumber. I don't know to what purpose you intend to put the resulting dictionary. That ultimate use would dictate whether an NSNumber can be used. Regards, Ken _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
