Closed eks5115 closed 3 weeks ago
You have to downcast the NSColor
to AnyObject
before passing it to the function:
vec![Id::as_super(Id::as_super(NSColor::whiteColor()))]
Which, I know, isn't pretty, but that's how it works currently
Thank you! Compile successfully.
let title = NSString::from_str("title");
let dict = NSDictionary::from_vec(
&[NSForegroundColorAttributeName],
vec![Id::into_super(Id::into_super(NSColor::redColor()))]
);
let attr_title = NSAttributedString::initWithString_attributes(NSAttributedString::alloc(), &title, Some(dict.as_ref()));
&NSDictionary<NSString>
, found&NSDictionary<NSString, NSColor>